Skip to content
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

Allow MemGPT to read/write text files + make HTTP requests #174

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

cpacker
Copy link
Collaborator

@cpacker cpacker commented Oct 29, 2023

Addresses #26


TODO

  • Allow toggling of preset from CLI (right now it's hardcoded)

Example with MemGPT launching HTTP requests

image

Example with MemGPT reading / writing from a shared .txt file

image
$ cat notes.txt
I will tell you a secret

Modify the file, then check if MemGPT can read the updated file:

$ echo "I like dogs" >> notes.txt
$ cat notes.txt
I will tell you a secret
I like dogs

MemGPT can successfully read from the updated file (after some prodding to read more lines):

image

@cpacker cpacker changed the title added file read/write functions Allow MemGPT to read/write text files + make HTTP requests Oct 29, 2023
@cpacker
Copy link
Collaborator Author

cpacker commented Oct 30, 2023

@vivi do we have to do anything special to support toggling the preset in the CLI?

Or can we simply add another arg here (and up the stack): https://github.com/cpacker/MemGPT/blob/main/memgpt/main.py#L165

memgpt/main.py Outdated Show resolved Hide resolved
@@ -445,15 +445,15 @@ async def run_agent_loop(memgpt_agent, first, no_verify=False, cfg=None, legacy=
continue

elif user_input.lower() == "/dump":
await print_messages(memgpt_agent.messages)
await memgpt.interface.print_messages(memgpt_agent.messages)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patches a bug

@cpacker
Copy link
Collaborator Author

cpacker commented Nov 1, 2023

Still need to add preset selection, put it separate PR

Copy link
Contributor

@vivi vivi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😈 LGTM

@cpacker cpacker merged commit 543db5a into main Nov 1, 2023
1 check passed
@cpacker cpacker deleted the new-functions branch November 1, 2023 08:08
mattzh72 pushed a commit that referenced this pull request Oct 9, 2024
* added file read/write

* added HTTP requests

* black on utils.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants