Integrate MemGPT in my codebase #315
Replies: 6 comments 26 replies
-
Second this. I am trying to figure out how to make the CLI show up in a browser. I love the console app but would love to create my own frontend. |
Beta Was this translation helpful? Give feedback.
-
EDIT: this example was tested with memgpt I've had some success invoking the memgpt agent from code, mostly by looking at how autogen integration was done. I will share my code here, which should at least serve as a starting point for your own projects. This code depends on an existing config file. The easiest way to create the config file is via command line: My code below expects a config file called
Run first with I'm really not sure if this is the best, or even correct way to use it; but at least it works and gives a jumping-off point for further exploration. I've got an adaptation of the above code for Azure as well, if that's of interest. |
Beta Was this translation helpful? Give feedback.
-
Hey @BabellDev! Appreciate this; however, I wonder how did you get ImportError Traceback (most recent call last)
Cell In[19], line 1
----> 1 from memgpt.personas import personas
ImportError: cannot import name 'personas' from 'memgpt.personas' (/home/vscode/.local/lib/python3.9/site-packages/memgpt/personas/__init__.py) Thanks! |
Beta Was this translation helpful? Give feedback.
-
@abkosar here is updated code that works with memgpt You may need to generate a new Instructions are the same as the original code I posted.
I will experiment with implementing REPL (loop) and post my results if successful |
Beta Was this translation helpful? Give feedback.
-
For future reference, a big (community) PR by @BabellDev was merged that adds a clean way to interact with MemGPT via python (via a "python client"): #713. This should be very useful for connecting to existing Python chat/web UI interfaces like gradio. Documentation: https://memgpt.readme.io/docs/python_client This is not in the main package yet, it will be added as part of 0.2.11. If you want to use this now, install from source or use |
Beta Was this translation helpful? Give feedback.
-
Hello Everyone
I was looking for some documentation/guidance on how to integrate memgpt on my projects.
An API will be nice or a python library
any insight ?
Beta Was this translation helpful? Give feedback.
All reactions