From 6a473a9db5c887c7e84dc64e9497d10e2d553d7c Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 7 Apr 2026 18:46:17 +0530 Subject: [PATCH] fix: set context before update settings for live --- api/services/workflow/pipecat_engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/services/workflow/pipecat_engine.py b/api/services/workflow/pipecat_engine.py index bf5c0d9..8212609 100644 --- a/api/services/workflow/pipecat_engine.py +++ b/api/services/workflow/pipecat_engine.py @@ -174,13 +174,13 @@ class PipecatEngine: tools_schema = ToolsSchema(standard_tools=functions) self.context.set_tools(tools_schema) - await self.llm._update_settings(LLMSettings(system_instruction=system_prompt)) - # For Gemini Live, set context on the LLM before _update_settings so that # _connect (triggered by reconnect) can read tools from it. if hasattr(self.llm, "_context") and not self.llm._context and self.context: self.llm._context = self.context + await self.llm._update_settings(LLMSettings(system_instruction=system_prompt)) + def _format_prompt(self, prompt: str) -> str: """Delegate prompt formatting to the shared workflow.utils implementation."""