Skip to content

armgit / letta

Public Imported from GitHub
0

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.py
index 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 SimpleGeminiStreamingInt
from letta.interfaces.openai_streaming_interface import SimpleOpenAIResponsesStreamingInterface, SimpleOpenAIStreamingInterface
from letta.schemas.enums import ProviderType
from letta.schemas.letta_message import LettaMessage
-from letta.schemas.letta_message_content import SummarizedReasoningContent, TextContent
+from letta.schemas.letta_message_content import LettaMessageContentUnion
from letta.schemas.provider_trace import ProviderTraceCreate
from letta.schemas.usage import LettaUsageStatistics
from 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