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.pyindex 7b67f4ec9..6253b82d5 100644--- a/memgpt/agent_store/db.py+++ b/memgpt/agent_store/db.py@@ -198,7 +198,7 @@ def get_db_model(# openai inforole = 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 specifyingname = Column(String) # optional: multi-agent only# tool call request infodiff --git a/memgpt/data_types.py b/memgpt/data_types.pyindex 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 callname: Optional[str] = None, # optional participant namecreated_at: Optional[str] = None,tool_calls: Optional[List[ToolCall]] = None, # list of tool calls requested