diff --git a/src/pipecat/services/aws/llm.py b/src/pipecat/services/aws/llm.py index 63b0964c2..cec0cc2e6 100644 --- a/src/pipecat/services/aws/llm.py +++ b/src/pipecat/services/aws/llm.py @@ -382,15 +382,8 @@ class BedrockLLMContext(OpenAILLMContext): # See if we should pull the system message out of our context.messages list. (For # compatibility with Open AI messages format.) if self.messages and self.messages[0]["role"] == "system": - if len(self.messages) == 1: - # If we have only have a system message in the list, all we can really do - # without introducing too much magic is change the role to "user". - self.messages[0]["role"] = "user" - else: - # If we have more than one message, we'll pull the system message out of the - # list. - self.system = self.messages[0]["content"] - self.messages.pop(0) + self.system = self.messages[0]["content"] + self.messages.pop(0) # Merge consecutive messages with the same role. i = 0