-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: patch /rewrite
#1034
fix: patch /rewrite
#1034
Conversation
@@ -615,6 +615,15 @@ def run( | |||
# create agent | |||
try: | |||
preset = ms.get_preset(preset_name=agent_state.preset, user_id=user.id) | |||
if preset is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this I think the user will get an error until they run memgpt configure
when going from 0.3.x -> 0.3.3
memgpt/agent_store/db.py
Outdated
@@ -491,6 +491,24 @@ def insert(self, record: Record, exists_ok=True): | |||
self.insert_many([record], exists_ok=exists_ok) | |||
|
|||
|
|||
def update(self, record: RecordType): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is untested (though the unit test should theoretically check it?)
Please describe the purpose of this pull request.
/rewrite
allows rewriting the message an agent sent/rewrite
command to instead modify the underlyingMessage
DB object, so it will properly persistHow to test
Try
/rewrite
and see if (1) the message is rewritten in the buffer (is in/dump
), and (2) that it persists on a load (/exit
and reopen the agent, then/dump
)Have you tested this PR?
Yes, with the SQLite + Chroma backend:
/rewrite
on a fresh agent