Commit Graph

71 Commits

Author SHA1 Message Date
Charles Packer
9f238e4b80
fix: another patch for test_cli (#876) 2024-01-20 17:00:40 -08:00
Charles Packer
93393e8389
fix: patch test_cli (#875) 2024-01-20 16:45:44 -08:00
Robin Goetz
8292f4fe5e
feat: Next iteration of ChatUI (#847)
Co-authored-by: Charles Packer <packercharles@gmail.com>
2024-01-20 16:28:31 -08:00
Sarah Wooders
cca9b38294
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
7c99fbd009
feat: local auth config (#854) 2024-01-18 16:43:41 -08:00
Charles Packer
e4fab1653e
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
d1b1548ba0
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
d1a73f56c7
fix: properly handle CLI flags passed to memgpt run (#833) 2024-01-16 14:47:11 -08:00
cpacker
2733659f7f Added logging option for server process, fixed bug on agent list with bad type 2024-01-15 12:55:51 -08:00
Charles Packer
0ac3ed60b5
Merge branch 'main' into goetzrobin-chatui-rebased-on-main 2024-01-15 10:50:18 -08:00
ifsheldon
f88f930354
fix: Turn off all ensure_ascii of json.dumps (#800) 2024-01-11 23:54:35 -08:00
Charles Packer
288fb5e176
feat: Properly handle old config migration/recreation on memgpt run (#804) 2024-01-11 20:23:20 -08:00
Charles Packer
75467c2fb8
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
6710f18c07 Merge branch 'main' into feature/global-logging
# Conflicts:
#	memgpt/config.py
2024-01-11 11:12:03 -05:00
Robin Goetz
b5f38ec556 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
f86ad2eb75 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
18d33e9557 remove AgentConfig imports 2024-01-09 11:38:46 -08:00
Sarah Wooders
8c06cc4bf7
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
2343851cae 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
d6a56b262e
Merge branch 'main' into cherry-pick-storage-refactor 2023-12-30 21:38:58 -08:00
BabellDev
8736d46526
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
4de0e8b4f9
add cleanup code (#726) 2023-12-28 22:00:24 -08:00
Sarah Wooders
d2dcae5b26 Re-run black formatter on resolved conflicts 2023-12-27 13:50:24 +04:00
Sarah Wooders
36c1e340e6
Merge branch 'main' into cherry-pick-storage-refactor 2023-12-27 13:47:27 +04:00
Charles Packer
bccd990ab6
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
42c73137c9 [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
1b968e372b 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
04f8576c66 Support attaching data sources to agents for storage refactor 2023-12-26 17:07:28 +04:00
Sarah Wooders
d258f03899 Define refactored storage table types (archival, recall, documents,
users, agents)
2023-12-26 17:04:11 +04:00
Max Blackmer, CSM
e67c521da8
Merge branch 'main' into feature/global-logging 2023-12-25 14:53:19 -05:00
Charles Packer
10840fc5f4
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
2e3bbd8510
fix: allow edge case of quickstart before run on first install (#684) 2023-12-23 12:06:19 -08:00
Charles Packer
19c48912ac
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
683492f7c1
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
0c3061d355
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
7d3e5b24f0
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
cfbec583ae
fix: Throw "env vars not set" early + enhance attach for KeyboardInterrupt (#669) (#674) 2023-12-21 20:47:34 -08:00
Charles Packer
2eb208ae82
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
77584a9df5
feat: Add memgpt quickstart command (#641)
* Revert "Revert "nonfunctional 404 quickstart command w/ some other typo corrections""

This reverts commit 5dbdf31f1c.

* Revert "Revert "added example config file""

This reverts commit 72a58f6de3.

* 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
72f28d3853 [cpacker#319] run Black Reformat on files. 2023-12-19 15:09:08 -05:00
Max Blackmer
f79147b5a6 Merge branch 'feature/global-logging' of github.com:agiletechnologist/MemGPT into feature/global-logging 2023-12-18 16:55:23 -05:00
Max Blackmer
119b1afccd [#319] Global Logging Configuration with directory fixes at config load. 2023-12-18 16:51:23 -05:00
cpacker
5dbdf31f1c Revert "nonfunctional 404 quickstart command w/ some other typo corrections"
This reverts commit 22119cfb03.
2023-12-18 00:48:47 -08:00
cpacker
22119cfb03 nonfunctional 404 quickstart command w/ some other typo corrections 2023-12-18 00:45:02 -08:00
Charles Packer
6a964123a0
feat: added memgpt folder command (#632)
* added memgpt folder command

* comments
2023-12-17 10:54:17 -08:00
Charles Packer
fcbb1ed5f7
allow passing custom host to uvicorn (#618) 2023-12-14 13:01:33 -08:00
Charles Packer
0ca014948b
added memgpt server command (#611)
* added memgpt server command

* added the option to specify a port (rest default 8283, ws default 8282)

* fixed import in test

* added agent saving on shutdown

* added basic locking mechanism (assumes only one server.py is running at the same time)

* remove 'STOP' from buffer when converting to list for the non-streaming POST resposne

* removed duplicate on_event (redundant to lifespan)

* added GET agents/memory route

* added GET agent config

* added GET server config

* added PUT route for modifying agent core memory

* refactored to put server loop in separate function called via main
2023-12-13 00:41:40 -08:00
Charles Packer
7615830a73
use a consistent warning prefix across codebase (#569) 2023-12-04 11:38:51 -08:00
Sarah Wooders
dd5a110be4
Removing dead code + legacy commands (#536) 2023-11-30 13:37:11 -08:00
Charles Packer
bc0c1e4a37
Remove openai package and migrate to requests (#534) 2023-11-30 13:00:13 -08:00