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: allow null Message.model to patch IntegrityError (#831)

Charles Packer954cd1ffe6da
diff --git a/memgpt/agent_store/db.py b/memgpt/agent_store/db.py
index 7b67f4ec9..6253b82d5 100644
--- a/memgpt/agent_store/db.py
+++ b/memgpt/agent_store/db.py
@@ -198,7 +198,7 @@ def get_db_model(
# openai info
role = Column(String, nullable=False)
text = Column(String) # optional: can be null if function call
- model = Column(String, nullable=False)
+ model = Column(String) # optional: can be null if LLM backend doesn't require specifying
name = Column(String) # optional: multi-agent only
# tool call request info
diff --git a/memgpt/data_types.py b/memgpt/data_types.py
index f361cd89e..07f039f0f 100644
--- a/memgpt/data_types.py
+++ b/memgpt/data_types.py
@@ -53,7 +53,7 @@ class Message(Record):
agent_id: uuid.UUID,
role: str,
text: str,
- model: str, # model used to make function call
+ model: Optional[str], # model used to make function call
name: Optional[str] = None, # optional participant name
created_at: Optional[str] = None,
tool_calls: Optional[List[ToolCall]] = None, # list of tool calls requested