Bug fix in content format

This commit is contained in:
Adithya Suresh
2025-04-08 02:52:37 +00:00
committed by Aleix Conchillo Flaqué
parent b2b01861b2
commit fa5cac7e0a

View File

@@ -310,7 +310,7 @@ class BedrockLLMContext(OpenAILLMContext):
# in the proper format
if isinstance(self.messages[-1]["content"], str):
self.messages[-1]["content"] = [
{"type": "text", "text": self.messages[-1]["content"]}
{"text": self.messages[-1]["content"]}
]
# if this message has just a content string, convert it to a list
# in the proper format