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 1bfc53dd39
commit fc3f7cec51

View File

@@ -310,7 +310,7 @@ class BedrockLLMContext(OpenAILLMContext):
# in the proper format # in the proper format
if isinstance(self.messages[-1]["content"], str): if isinstance(self.messages[-1]["content"], str):
self.messages[-1]["content"] = [ 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 # if this message has just a content string, convert it to a list
# in the proper format # in the proper format