Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
refactor: move prompt string generation out of overloaded __str__ into a separate method (using 'string' atm, can change to something more explicitly named)
cpacker78fc7316b0c8
diff --git a/memgpt/schemas/memory.py b/memgpt/schemas/memory.pyindex 7e8d408e3..4709f436a 100644--- a/memgpt/schemas/memory.py+++ b/memgpt/schemas/memory.py@@ -20,6 +20,9 @@ class Memory(BaseModel, validate_assignment=True):return objdef __str__(self) -> str:+ raise NotImplementedError("Use the .string() method instead")++ def string(self) -> str:"""Representation of the memory in-context"""section_strs = []for section, module in self.memory.items():