From 70730616ec5b842ce51dd108b1be350786288956 Mon Sep 17 00:00:00 2001 From: Sabiha Khan <87858386+chewwbaka@users.noreply.github.com> Date: Tue, 24 Mar 2026 09:52:02 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20incorrect=20system=20instruction=20in=20?= =?UTF-8?q?llm=20inference=20of=20variable=20extrac=E2=80=A6=20(#201)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: incorrect system instruction in llm inference of variable extraction * chore: bump pipecat submodule version --- .../workflow/pipecat_engine_variable_extractor.py | 10 +++++++--- pipecat | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/api/services/workflow/pipecat_engine_variable_extractor.py b/api/services/workflow/pipecat_engine_variable_extractor.py index 05e198b..3e8bf63 100644 --- a/api/services/workflow/pipecat_engine_variable_extractor.py +++ b/api/services/workflow/pipecat_engine_variable_extractor.py @@ -193,15 +193,19 @@ class VariableExtractionManager: extraction_context = LLMContext() extraction_messages = [ - {"role": "system", "content": system_prompt}, {"role": "user", "content": user_prompt}, ] extraction_context.set_messages(extraction_messages) # ------------------------------------------------------------------ - # Use engine's LLM for out-of-band inference (no pipeline frames) + # Use engine's LLM for out-of-band inference (no pipeline frames). + # Pass system_prompt via system_instruction so it overrides the + # current node's system prompt that build_chat_completion_params + # would otherwise prepend. # ------------------------------------------------------------------ - llm_response = await self._engine.llm.run_inference(extraction_context) + llm_response = await self._engine.llm.run_inference( + extraction_context, system_instruction=system_prompt + ) # Get model name for tracing model_name = getattr(self._engine.llm, "model_name", "unknown") diff --git a/pipecat b/pipecat index 245d6f1..1c804fc 160000 --- a/pipecat +++ b/pipecat @@ -1 +1 @@ -Subproject commit 245d6f16843070971f067b302d239e5a2e2346a3 +Subproject commit 1c804fce7dcf65f705471b779600069fded9ffdd