From 6e734a37f9ef5f4a93dc6de86311e5e88c2cf682 Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Thu, 4 Sep 2025 12:59:39 -0400 Subject: [PATCH] Fix a bug in `AWSBedrockLLMService.run_inference()`; it was expecting the wrong format for the system instruction --- src/pipecat/services/aws/llm.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pipecat/services/aws/llm.py b/src/pipecat/services/aws/llm.py index 5eefaa35f..32d1789bc 100644 --- a/src/pipecat/services/aws/llm.py +++ b/src/pipecat/services/aws/llm.py @@ -809,14 +809,14 @@ class AWSBedrockLLMService(LLMService): # adapter = self.get_llm_adapter() # params: AWSBedrockLLMInvocationParams = adapter.get_llm_invocation_params(context) # messages = params["messages"] - # system = params["system_instruction"] + # system = params["system_instruction"] # [{"text": "system message"}] raise NotImplementedError( "Universal LLMContext is not yet supported for AWS Bedrock." ) else: context = AWSBedrockLLMContext.upgrade_to_bedrock(context) messages = context.messages - system = getattr(context, "system", None) + system = getattr(context, "system", None) # [{"text": "system message"}] # Determine if we're using Claude or Nova based on model ID model_id = self.model_name @@ -833,7 +833,7 @@ class AWSBedrockLLMService(LLMService): } if system: - request_params["system"] = [{"text": system}] + request_params["system"] = system async with self._aws_session.client( service_name="bedrock-runtime", **self._aws_params