Skip to content

Commit

Permalink
I forgot black.
Browse files Browse the repository at this point in the history
  • Loading branch information
madgrizzle committed Aug 12, 2024
1 parent 2d8408f commit 570c663
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions memgpt/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def to_record(self) -> Source:
description=self.description,
)


class ArchivalPassageModel(Base):
"""Defines data model for storing Passages (consisting of text, embedding)"""

Expand Down Expand Up @@ -282,6 +283,7 @@ def to_record(self) -> Passage:
doc_id=self.doc_id,
)


class RecallPassageModel(Base):
"""Defines data model for storing Passages (consisting of text, embedding)"""

Expand Down Expand Up @@ -322,6 +324,7 @@ def to_record(self) -> Passage:
doc_id=self.doc_id,
)


class AgentSourceMappingModel(Base):
"""Stores mapping between agent -> source"""

Expand Down Expand Up @@ -437,7 +440,7 @@ def __init__(self, config: MemGPTConfig):
ToolModel.__table__,
JobModel.__table__,
ArchivalPassageModel.__table__,
RecallPassageModel.__table__,
RecallPassageModel.__table__,
],
)
except (InterfaceError, OperationalError) as e:
Expand Down Expand Up @@ -644,7 +647,7 @@ def delete_agent(self, agent_id: uuid.UUID):
session.query(AgentModel).filter(AgentModel.id == agent_id).delete()
session.query(ArchivalPassageModel).filter(ArchivalPassageModel.agent_id == agent_id).delete()
session.query(RecallPassageModel).filter(RecallPassageModel.agent_id == agent_id).delete()

# delete mappings
session.query(AgentSourceMappingModel).filter(AgentSourceMappingModel.agent_id == agent_id).delete()

Expand Down

0 comments on commit 570c663

Please sign in to comment.