Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: patch bug will `None` content when assistant messages have no tool calls (#3172)
Charles Packerd2f5bb676f66
diff --git a/letta/schemas/message.py b/letta/schemas/message.pyindex 5b7cedb7f..2243cc96b 100644--- a/letta/schemas/message.py+++ b/letta/schemas/message.py@@ -698,7 +698,7 @@ class Message(BaseMessage):elif self.role == "assistant":assert self.tool_calls is not None or text_content is not Noneopenai_message = {- "content": None if put_inner_thoughts_in_kwargs else text_content,+ "content": None if (put_inner_thoughts_in_kwargs and self.tool_calls is not None) else text_content,"role": self.role,}