Notebook Utils

ibm_watsonx_gov.agent_catalog.utils.notebook_utils.display_agents(search_text: str = None, limit: int = None)

Display the agents output in a dataframe

Parameters:
  • search_text (str, optional) – text to search in the agents name, display name, description and summary fields

  • limit (int, optional) – The maximum number of tools to display

ibm_watsonx_gov.agent_catalog.utils.notebook_utils.get_all_code_from_notebook(notebook_path: str, main_method_name: str) str

Reads all code cells from a Jupyter notebook and returns combined Python code.

Parameters:
  • notebook_path – Path of the notebook

  • main_method_name – Name of the method to stop reading after this method in the notebook

Returns:

collected code from notebook cells

Return type:

str