Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: allow multiple text content parts in a message (#5128)
cthomas647a410e626d
diff --git a/letta/schemas/message.py b/letta/schemas/message.pyindex bc42bba0f..5883d1524 100644--- a/letta/schemas/message.py+++ b/letta/schemas/message.py@@ -856,8 +856,8 @@ class Message(BaseMessage):# Otherwise, check if we have TextContent and multiple other partselif self.content and len(self.content) > 1:text = [content for content in self.content if isinstance(content, TextContent)]- assert len(text) == 1, f"multiple text content parts found in a single message: {self.content}"- text_content = text[0].text+ # assert len(text) == 1, f"multiple text content parts found in a single message: {self.content}"+ text_content = "\n\n".join([t.text for t in text])parse_content_parts = Trueelse:text_content = None