fix provider
This commit is contained in:
parent
a02e500183
commit
69d2132a33
2 changed files with 5 additions and 3 deletions
|
|
@ -230,7 +230,7 @@ async def update_settings(request, session_manager):
|
|||
flows_service = _get_flows_service()
|
||||
await flows_service.update_chat_flow_system_prompt(
|
||||
body["system_prompt"],
|
||||
current_config.provider.model_provider.lower()
|
||||
current_config.agent.system_prompt
|
||||
)
|
||||
logger.info(f"Successfully updated chat flow system prompt")
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -622,9 +622,11 @@ class FlowsService:
|
|||
if not LANGFLOW_CHAT_FLOW_ID:
|
||||
raise ValueError("LANGFLOW_CHAT_FLOW_ID is not configured")
|
||||
|
||||
# The system_prompt field is in the Agent component, not the Language Model component
|
||||
# Determine target component IDs based on provider
|
||||
target_agent_id = self._get_provider_component_ids(provider)[1]
|
||||
|
||||
await self._update_flow_field(LANGFLOW_CHAT_FLOW_ID, "system_prompt", system_prompt,
|
||||
node_display_name="Agent")
|
||||
node_display_name=target_agent_id)
|
||||
|
||||
async def update_flow_docling_preset(self, preset: str, preset_config: dict):
|
||||
"""Helper function to update docling preset in the ingest flow"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue