Skip to content

fix: make openai not be required for ingestion to work#1101

Merged
lucaseduoli merged 8 commits into
mainfrom
fix/openai_prompting
Mar 12, 2026
Merged

fix: make openai not be required for ingestion to work#1101
lucaseduoli merged 8 commits into
mainfrom
fix/openai_prompting

Conversation

@lucaseduoli

Copy link
Copy Markdown
Collaborator

This pull request introduces improvements to provider and model configuration logic in flow files and the flows_service.py backend. The main focus is on making provider-specific fields more dynamic, updating how embedding nodes are handled, and ensuring models are enabled in Langflow before updating components. Additionally, several flow JSON files are updated to remove hardcoded default values and disable loading from the database for certain fields.

Provider/model configuration improvements:

  • Added new methods to src/services/flows_service.py for finding nodes by display name, determining node provider, and mapping provider names for display, which help streamline provider-specific logic.
  • Enhanced _update_provider_components to handle multiple embedding nodes, dynamically select which nodes to update based on the number of configured providers, and update existing nodes for the specified provider first.
  • Refactored _update_component_fields to dynamically update provider-specific fields, ensure models are enabled in Langflow before updating, and use a mapping for field values instead of hardcoded logic.

Flow JSON file changes:

  • Removed hardcoded values (e.g., "WATSONX_PROJECT_ID", "OPENAI_API_KEY") and set them to empty strings in flows/ingestion_flow.json, flows/openrag_agent.json, flows/openrag_nudges.json, and flows/openrag_url_mcp.json. [1] [2] [3] [4] [5]
  • Disabled loading from the database for fields like project_id and api_key in the same flow JSON files. [1] [2] [3] [4] [5]

These changes make the provider/model configuration more robust, reduce reliance on hardcoded values, and improve maintainability for future provider additions.

@lucaseduoli lucaseduoli self-assigned this Mar 11, 2026
@github-actions github-actions Bot added backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. labels Mar 11, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 11, 2026
@edwinjosechittilappilly

Copy link
Copy Markdown
Collaborator

Lucas am updatingt he branch and building local images to test!

@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 12, 2026
@edwinjosechittilappilly

Copy link
Copy Markdown
Collaborator

Default ingestion works with OpenAI.

But switching to WatsonX the ingestion failed.

@edwinjosechittilappilly

Copy link
Copy Markdown
Collaborator

Premep Approve Change the Var to WATSONX_APIKEY
Create a post issue to use LF API as a spike Post GA

@edwinjosechittilappilly edwinjosechittilappilly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. with NIT variable update

@github-actions github-actions Bot added the lgtm label Mar 12, 2026
@github-actions github-actions Bot added docker bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 12, 2026
@github-actions github-actions Bot added bug 🔴 Something isn't working. and removed bug 🔴 Something isn't working. labels Mar 12, 2026
@lucaseduoli lucaseduoli merged commit baca26f into main Mar 12, 2026
9 checks passed
@github-actions github-actions Bot deleted the fix/openai_prompting branch March 12, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend 🔷 Issues related to backend services (OpenSearch, Langflow, APIs) bug 🔴 Something isn't working. docker lgtm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants