From 647a410e626d3c3f1b9dd4a2aeba4a44fbeb1a70 Mon Sep 17 00:00:00 2001 From: cthomas Date: Fri, 3 Oct 2025 15:01:34 -0700 Subject: [PATCH] feat: allow multiple text content parts in a message (#5128) --- letta/schemas/message.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/letta/schemas/message.py b/letta/schemas/message.py index bc42bba0..5883d152 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 parts elif 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 = True else: text_content = None