Skip to content

Commit e24c387

Browse files
feat: Add IBM Watsonx and Ollama to Agent Component (#10357)
* Refactor knowledge base path initialization Replaces direct settings access with a lazy-loading function for the knowledge bases root path in Knowledge Ingestion and Knowledge Retrieval starter projects. This improves reliability and consistency when accessing the knowledge base directory, and updates all usages to the new helper function. * Update component_index.json * Add IBM watsonx.ai support to starter projects Introduces IBM watsonx.ai as a selectable model provider in multiple starter project JSONs. Adds new input fields for 'base_url', 'project_id', and 'max_output_tokens' to support IBM watsonx.ai integration. Updates agent component code to handle new provider and its required parameters. * Add Ollama to supported LLM providers in starter projects Ollama has been added as a supported provider alongside Anthropic, Google Generative AI, OpenAI, and IBM watsonx.ai in all starter project JSON files. This expands the available options for LLM integration in initial setup templates. * Update Ollama model input constants and logic Refactored model_input_constants.py to update the OLLAMA_MODEL_INPUTS and OLLAMA_MODEL_INPUTS_MAP. Modified ollama.py to use the new input mapping and improved input handling for Ollama components. * Add Notion integration components Added Notion-related components to the component index, including AddContentToPage, NotionDatabaseProperties, NotionListPages, NotionPageContent, NotionPageCreator, NotionPageUpdate, and NotionSearch. These components enable interaction with Notion databases and pages, supporting operations such as querying, creating, updating, and retrieving content. * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * [autofix.ci] apply automated fixes (attempt 3/3) * Update agent code and code_hash in starter projects Refactored the AgentComponent code in multiple starter project JSON files to remove IBM watsonx.ai-specific logic and ensure consistent OpenAI input filtering. Updated the code_hash metadata to reflect the new code version. * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * Update component_index.json * Use PEP 604 union syntax for provider_name type hints Updated type hints for provider_name parameters to use the 'str | None' syntax instead of 'str = None' for better clarity and compliance with modern Python standards. Also added a docstring line for provider_name in process_inputs. * Remove commented watsonx_inputs_filtered line Deleted a commented-out line referencing watsonx_inputs_filtered in AgentComponent to clean up the code. * Update component_index.json * Add support for new LLM providers and agent config fields Expanded agent configuration to support IBM watsonx.ai and Ollama as model providers. Added new input fields for base_url, project_id, and max_output_tokens to agent components in starter projects. Updated code logic to handle these new fields and providers for improved flexibility and integration. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent a703f7b commit e24c387

20 files changed

Lines changed: 1295 additions & 90 deletions

src/backend/base/langflow/initial_setup/starter_projects/Instagram Copywriter.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/Invoice Summarizer.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/Market Research.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/News Aggregator.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/Nvidia Remix.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/Pokédex Agent.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/Price Deal Finder.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/Research Agent.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/SaaS Pricing.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

src/backend/base/langflow/initial_setup/starter_projects/Search agent.json

Lines changed: 61 additions & 3 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)