mirror of
https://github.com/dograh-hq/dograh.git
synced 2026-06-07 07:55:16 +02:00
fix: set context before update settings for live
This commit is contained in:
parent
e04ce4e852
commit
6a473a9db5
1 changed files with 2 additions and 2 deletions
|
|
@ -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."""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue