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.

fix: create response_format for creation (#1870)

Andy Li9a69afb32b3d
diff --git a/letta/client/client.py b/letta/client/client.py
index 04572a6b2..a9ba7b937 100644
--- a/letta/client/client.py
+++ b/letta/client/client.py
@@ -85,6 +85,7 @@ class AbstractClient(object):
description: Optional[str] = None,
tags: Optional[List[str]] = None,
message_buffer_autoclear: bool = False,
+ response_format: Optional[ResponseFormatUnion] = None,
) -> AgentState:
raise NotImplementedError
@@ -2352,6 +2353,7 @@ class LocalClient(AbstractClient):
initial_message_sequence: Optional[List[Message]] = None,
tags: Optional[List[str]] = None,
message_buffer_autoclear: bool = False,
+ response_format: Optional[ResponseFormatUnion] = None,
) -> AgentState:
"""Create an agent
@@ -2405,6 +2407,7 @@ class LocalClient(AbstractClient):
"initial_message_sequence": initial_message_sequence,
"tags": tags,
"message_buffer_autoclear": message_buffer_autoclear,
+ "response_format": response_format,
}
# Only add name if it's not None
diff --git a/letta/services/agent_manager.py b/letta/services/agent_manager.py
index ce228c6c0..aa94dae6c 100644
--- a/letta/services/agent_manager.py
+++ b/letta/services/agent_manager.py
@@ -236,6 +236,7 @@ class AgentManager:
base_template_id=agent_create.base_template_id,
message_buffer_autoclear=agent_create.message_buffer_autoclear,
enable_sleeptime=agent_create.enable_sleeptime,
+ response_format=agent_create.response_format,
created_by_id=actor.id,
last_updated_by_id=actor.id,
)