letta-ai / letta

Letta (formerly MemGPT) is a framework for creating LLM services with memory.
https://letta.com
Apache License 2.0
12.88k stars 1.41k forks source link

fix: make runtime error warnings.warn instead #2088

Closed cpacker closed 8 hours ago

cpacker commented 8 hours ago

Silence:

  File "/Users/shub/Developer/MemGPT/letta/server/server.py", line 1489, in update_agent_core_memory
    save_agent(letta_agent, self.ms)
  File "/Users/shub/Developer/MemGPT/letta/agent.py", line 1604, in save_agent
    ms.update_agent(agent_state)
  File "/Users/shub/Developer/MemGPT/letta/utils.py", line 542, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shub/Developer/MemGPT/letta/metadata.py", line 455, in update_agent
    del fields["_internal_memory"]
        ~~~~~~^^^^^^^^^^^^^^^^^^^^
KeyError: '_internal_memory'