Commit Graph

79 Commits

Author SHA1 Message Date
Charles Packer
5112f5e161 fix: use utf-8 encodings for all text files (#918) 2024-01-30 11:59:58 -08:00
Charles Packer
d9c87a266f fix: misc updates to the migration code to improve migration UX (#941) 2024-01-29 17:42:41 -08:00
Charles Packer
037cc16e32 refactor: fix typing errors (pyright) (#855) 2024-01-23 17:21:44 -08:00
Sarah Wooders
35b48c5fc0 fix: add Annotated to CLI options (#906)
Co-authored-by: Charles Packer <packercharles@gmail.com>
2024-01-23 11:27:24 -08:00
Sarah Wooders
888a69af85 fix: chroma bug with repeated loading of same source (#909) 2024-01-23 10:29:40 -08:00
tombedor
570dc2a893 fix: simplify user config (#904) 2024-01-22 19:25:03 -08:00
Charles Packer
08d5fe8edd refactor: refactor MemGPT + AutoGen integration to work with MemGPT 0.2.12+ (DB release) (#905) 2024-01-22 17:49:48 -08:00
Charles Packer
6094726dfe fix: various fixes + make sure to save agent on creation to avoid missing agent_state.state entries (#877) 2024-01-20 17:28:39 -08:00
Charles Packer
324e193846 fix: another patch for test_cli (#876) 2024-01-20 17:00:40 -08:00
Charles Packer
eeba15cba3 fix: patch test_cli (#875) 2024-01-20 16:45:44 -08:00
Robin Goetz
f285f8601e feat: Next iteration of ChatUI (#847)
Co-authored-by: Charles Packer <packercharles@gmail.com>
2024-01-20 16:28:31 -08:00
Sarah Wooders
4039763de5 feat: Store embeddings padded to size 4096 to allow DB storage of varying size embeddings (#852)
Co-authored-by: cpacker <packercharles@gmail.com>
2024-01-19 16:03:13 -08:00
Charles Packer
77e5c43c8f feat: local auth config (#854) 2024-01-18 16:43:41 -08:00
Charles Packer
da5a8cdbfe refactor: remove User LLM/embed. defaults, add credentials file, add authentication option for custom LLM backends (#835) 2024-01-18 16:11:35 -08:00
Charles Packer
c07746b097 refactor: Use Message types inside Agent state (agent.messages), enabling immediate tracking of Message objects (#836)
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2024-01-17 17:02:56 -08:00
Charles Packer
0d12246096 fix: properly handle CLI flags passed to memgpt run (#833) 2024-01-16 14:47:11 -08:00
cpacker
112e29b3a6 Added logging option for server process, fixed bug on agent list with bad type 2024-01-15 12:55:51 -08:00
Charles Packer
350785e9f3 Merge branch 'main' into goetzrobin-chatui-rebased-on-main 2024-01-15 10:50:18 -08:00
ifsheldon
dd2f4fc873 fix: Turn off all ensure_ascii of json.dumps (#800) 2024-01-11 23:54:35 -08:00
Charles Packer
1af40860fd feat: Properly handle old config migration/recreation on memgpt run (#804) 2024-01-11 20:23:20 -08:00
Charles Packer
f118e01ad1 feat: Migration command for importing old agents into new DB backend (#802)
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2024-01-11 14:57:21 -08:00
Max Blackmer
10865a4cb8 Merge branch 'main' into feature/global-logging
# Conflicts:
#	memgpt/config.py
2024-01-11 11:12:03 -05:00
Robin Goetz
39ada91fe7 feat: next iteration of chat ui (#637)
* feat: add loading indicator when creating new agent

* feat: reorder front page to avoid overflow and always show add button

* feat: display function calls

* feat: set up proxy during development & remove explicit inclusion of host/port in backend calls

* fix: introduce api prefix, split up fastapi server to become more modular, use app directly instead of subprocess

the api prefix allows us to create a proxy for frontend development that relays all /api
requests to our fastapi, while serving the development files for other paths.
splitting up the fastapi server will allow us to branch out and divide up the work better
in the future. using the application directly in our cli instead of a subprocess makes
debugging a thing in development and overall this python native way just seems cleaner.
we can discuss if we should keep the api prefix or if we should distinguish between a REST only
mode and one that also serves the static files for the GUI.
This is just my initial take on things

* chore: build latest frontend
2024-01-11 14:47:51 +01:00
Robin Goetz
a68e2c838d feat: adding first poc of web UI (#625)
* updated local APIs to return usage info (#585)

* updated APIs to return usage info

* tested all endpoints

* added autogen as an extra (#616)

* added autogen as an extra

* updated docs

Co-authored-by: hemanthsavasere <hemanth.savasere@gmail.com>

* Update LICENSE

* Add safeguard on tokens returned by functions (#576)

* swapping out hardcoded str for prefix (forgot to include in #569)

* add extra failout when the summarizer tries to run on a single message

* added function response validation code, currently will truncate responses based on character count

* added return type hints (functions/tools should either return strings or None)

* discuss function output length in custom function section

* made the truncation more informative

* patch bug where None.copy() throws runtime error (#617)

* allow passing custom host to uvicorn (#618)

* feat: initial poc for socket server

* feat: initial poc for frontend based on react

Set up an nx workspace which maks it easy to manage dependencies and added shadcn components
that allow us to build good-looking ui in a fairly simple way.
UI is a very simple and basic chat that starts with a message of the user and then simply displays the
answer string that is sent back from the fastapi ws endpoint

* feat: mapp arguments to json and return new messages

Except for the previous user message we return all newly generated messages and let the frontend figure out how to display them.

* feat: display messages based on role and show inner thoughts and connection status

* chore: build newest frontend

* feat(frontend): show loader while waiting for first message and disable send button until connection is open

* feat: make agent send the first message and loop similar to CLI

currently the CLI loops until the correct function call sends a message to the user. this is an initial try to achieve a similar behavior in the socket server

* chore: build new version of frontend

* fix: rename lib directory so it is not excluded as part of python gitignore

* chore: rebuild frontend app

* fix: save agent at end of each response to allow the conversation to carry on over multiple sessions

* feat: restructure server to support multiple endpoints and add agents and sources endpoint

* feat: setup frontend routing and settings page

* chore: build frontend

* feat: another iteration of web interface

changes include: websocket for chat. switching between different agents. introduction of zustand state management

* feat: adjust frontend to work with memgpt rest-api

* feat: adjust existing rest_api to serve and interact with frontend

* feat: build latest frontend

* chore: build latest frontend

* fix: cleanup workspace

---------

Co-authored-by: Charles Packer <packercharles@gmail.com>
Co-authored-by: hemanthsavasere <hemanth.savasere@gmail.com>
2024-01-11 14:47:51 +01:00
Sarah Wooders
d331c71ec3 remove AgentConfig imports 2024-01-09 11:38:46 -08:00
Sarah Wooders
54fa07da7a refactor!: Migrate users + agent information into storage connectors (#785)
Co-authored-by: cpacker <packercharles@gmail.com>
2024-01-08 15:59:49 -08:00
Max Blackmer
72d184a5e3 Merge branch 'feature/global-logging' of github.com:agiletechnologist/MemGPT into feature/global-logging
Removed Logging from configurations and migrated to constants.py
Modified log.py to configure using constants to configure logging

 Conflicts:
      memgpt/config.py resolved
2024-01-05 18:11:17 -05:00
Charles Packer
b487366f21 Merge branch 'main' into cherry-pick-storage-refactor 2023-12-30 21:38:58 -08:00
BabellDev
b2e9a24671 feat: Add MemGPT "Python Client" (#713)
* First commit of memgpt client and some messy test code

* rolled back unnecessary changes to abstract interface; switched client to always use Queueing Interface

* Added missing interface clear() in run_command;  added convenience method for checking if an agent exists, used that in create_agent

* Formatting fixes

* Fixed incorrect naming of get_agent_memory in rest server

* Removed erroneous clear from client save method;  Replaced print statements with appropriate logger calls in server

* Updated readme with client usage instructions

* added tests for Client

* make printing to terminal togglable on queininginterface (should probably refactor this to a logger)

* turn off printing to stdout via interface by default

* allow importing the python client in a similar fashion to openai-python (see https://github.com/openai/openai-python)

* Allowed quickstart on init of client;  updated readme and test_client accordingly

* oops, fixed name of openai_api_key config key

* Fixed small typo

* Fixed broken test by adding memgpt hosted model details to agent config

* silence llamaindex 'LLM is explicitly disabled. Using MockLLM.' on server

* default to openai if user's memgpt directory is empty (first time)

* correct type hint

* updated section on client in readme

* added comment about how MemGPT config != Agent config

* patch unrelated test

* update wording on readme

* patch another unrelated test

* added python client to readme docs

* Changed 'user' to 'human' in example;  Defaulted AgentConfig.model to 'None';  Fixed issue in create_agent (accounting for dict config);  matched test code to example

* Fixed advanced example

* patch test

* patch

---------

Co-authored-by: cpacker <packercharles@gmail.com>
2023-12-30 12:43:46 -08:00
Charles Packer
53500d4688 add cleanup code (#726) 2023-12-28 22:00:24 -08:00
Sarah Wooders
b598f3e2d4 Re-run black formatter on resolved conflicts 2023-12-27 13:50:24 +04:00
Sarah Wooders
77e72d18da Merge branch 'main' into cherry-pick-storage-refactor 2023-12-27 13:47:27 +04:00
Charles Packer
42e2a301eb fix: increase the func return char limit (#714)
* increase the funct return limit

* disable truncation for base search functions

* added stdout suppression to remove MockLLM warning
2023-12-27 01:33:30 -08:00
Max Blackmer
5733f0418d [cpacker#319] Refactor memgptlog.py to log.py and move a function to log.py 2023-12-26 08:52:24 -05:00
Sarah Wooders
11096b20a4 Set get_all limit to None by default and add postgres to archival memory tests 2023-12-26 17:07:54 +04:00
Sarah Wooders
d4ddf549e3 Support attaching data sources to agents for storage refactor 2023-12-26 17:07:28 +04:00
Sarah Wooders
234a444090 Define refactored storage table types (archival, recall, documents,
users, agents)
2023-12-26 17:04:11 +04:00
Max Blackmer, CSM
ebbd176e71 Merge branch 'main' into feature/global-logging 2023-12-25 14:53:19 -05:00
Charles Packer
6394ca73ef Added length checking to the persona/human loader functions, also updated the CLI error dump to look prettier (eg on over length errors) (#695) 2023-12-24 23:05:13 -08:00
Charles Packer
1c983e7a53 fix: allow edge case of quickstart before run on first install (#684) 2023-12-23 12:06:19 -08:00
Charles Packer
3482a196d6 feat: improve CLI appearance (#687)
* prettified standard cli output

* also suppress stdout for agent loading

* better spacing

* added emoji to existing agent load
2023-12-23 11:39:51 -08:00
Charles Packer
0b765ee95b fix: Patch quickstart via run on empty dir (#682)
* fixed bug where memgpt run's quickstart invocation was pulling from latest instead of local

* patched missing config dir creation step
2023-12-22 11:17:47 -08:00
Charles Packer
7053d1ff8e moved configs folder inside memgpt so that it gets included with the package, updated paths (#680) 2023-12-22 10:34:04 -08:00
Charles Packer
ce0c3c92d1 feat: further simplify setup flow (#673)
* made quickstart to openai or memgpt the default option when the user doesn't have a config set

* modified formatting + message styles

* revised quickstart guides in docs to talk about quickstart command

* make message consistent

---------

Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2023-12-22 13:21:25 +04:00
Matheus
f22923d716 fix: Throw "env vars not set" early + enhance attach for KeyboardInterrupt (#669) (#674) 2023-12-21 20:47:34 -08:00
Charles Packer
46f686dfde fix: Patch openai error message + openai quickstart (#665)
* removed risky prints

* cleanup

* fix bug with openai quickstart, add extra visual indicators that quickstart worked

* changed message
2023-12-21 00:17:37 -08:00
Charles Packer
f532ffc41f feat: Add memgpt quickstart command (#641)
* Revert "Revert "nonfunctional 404 quickstart command w/ some other typo corrections""

This reverts commit 5dbdf31f1ce939843ff97e649554d8bc0556a834.

* Revert "Revert "added example config file""

This reverts commit 72a58f6de31f3ff71847bbaf083a91182469f9af.

* tested and working

* added and tested openai quickstart, added fallback if internet 404's to pull from local copy

* typo

* updated openai key input message to include html link

* renamed --type to --backend, added --latest flag which fetches from online default is to pull from local file

* fixed links
2023-12-20 00:00:40 -08:00
Max Blackmer
f7df7d6d78 [cpacker#319] run Black Reformat on files. 2023-12-19 15:09:08 -05:00
Max Blackmer
f054832a48 Merge branch 'feature/global-logging' of github.com:agiletechnologist/MemGPT into feature/global-logging 2023-12-18 16:55:23 -05:00
Max Blackmer
6cafa9ae97 [#319] Global Logging Configuration with directory fixes at config load. 2023-12-18 16:51:23 -05:00