Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
feat: update assistant content parts union (#5115)
cthomas1d611d92b967
diff --git a/letta/adapters/simple_llm_stream_adapter.py b/letta/adapters/simple_llm_stream_adapter.pyindex 115f09971..4341eb99f 100644--- a/letta/adapters/simple_llm_stream_adapter.py+++ b/letta/adapters/simple_llm_stream_adapter.py@@ -7,7 +7,7 @@ from letta.interfaces.gemini_streaming_interface import SimpleGeminiStreamingIntfrom letta.interfaces.openai_streaming_interface import SimpleOpenAIResponsesStreamingInterface, SimpleOpenAIStreamingInterfacefrom letta.schemas.enums import ProviderTypefrom letta.schemas.letta_message import LettaMessage-from letta.schemas.letta_message_content import SummarizedReasoningContent, TextContent+from letta.schemas.letta_message_content import LettaMessageContentUnionfrom letta.schemas.provider_trace import ProviderTraceCreatefrom letta.schemas.usage import LettaUsageStatisticsfrom letta.schemas.user import User@@ -113,8 +113,8 @@ class SimpleLLMStreamAdapter(LettaLLMStreamAdapter):# TODO this should probably just be called "content"?# self.reasoning_content = self.interface.get_reasoning_content()- # Extract non-reasoning content (eg text)- self.content: List[TextContent | SummarizedReasoningContent] = self.interface.get_content()+ # Extract all content parts+ self.content: List[LettaMessageContentUnion] = self.interface.get_content()# Extract usage statistics# Some providers don't provide usage in streaming, use fallback if needed