Commit Graph

484 Commits

Author SHA1 Message Date
Sarah Wooders
f47e800982 feat: Add paginated memory queries (#825)
Co-authored-by: cpacker <packercharles@gmail.com>
2024-01-15 21:21:58 -08:00
cpacker
f615fa1d6f black 2024-01-15 18:12:18 -08:00
cpacker
f57ca9968f rename http title 2024-01-15 18:11:02 -08:00
cpacker
646f0e8593 various patches related to UUID usernames to make chatui work 2024-01-15 18:09:25 -08:00
Charles Packer
021209e5a3 fix: fix typo in memory.py (#822) 2024-01-15 14:14:13 -08:00
cpacker
41f9640364 fix: fixed the type hints in server to use uuid, patched tests that used strings as dummy users 2024-01-15 14:01:06 -08:00
Tom Bedor
4240012b7b fix: fix typo in memory.py 2024-01-15 13:54:13 -08:00
cpacker
e7e27fed17 fix: patch bug in validation decorator 2024-01-15 13:40:29 -08:00
cpacker
af3e3034ef fix: add type hints, drop stray User() creation 2024-01-15 13:27:47 -08:00
cpacker
95782da8a3 fix: patch bug in type checker 2024-01-15 13:27:25 -08:00
cpacker
93674fd506 fix: updated type hints 2024-01-15 13:21:00 -08:00
cpacker
27e07de808 fix: fixed bug on agent list with bad type 2024-01-15 13:15:13 -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
cpacker
434a4b2f99 fix: Fixed type hints in metadata.py, added basic type-checking decorator 2024-01-15 12:55:21 -08:00
Sarah Wooders
ef20f9c92e fix: add UUID typing and checks to data_types.py 2024-01-15 12:50:40 -08:00
cpacker
6ed1d337c8 fix: comment out persistencemanager (deprecated as on main), convert str to UUID before querying 2024-01-15 11:40:27 -08:00
cpacker
3881ef6ab2 add base user (anonclientid) creation to the init of the server, add missing cast of user_id into User object 2024-01-15 11:31:24 -08:00
cpacker
6734b38c91 revert diff on config.py to main 2024-01-15 11:01:53 -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
Jim Lloyd
465f7af847 fix: Fix load bug (#795)
Co-authored-by: Charles Packer <packercharles@gmail.com>
2024-01-11 23:05:43 -08:00
tombedor
7d246ac3a8 fix: store opeani key (#806) 2024-01-11 20:25:24 -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
5413822e84 chore: bump version to 0.2.12 (#805) 2024-01-11 15:52:51 -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
robingotz
e2e334ba4c chore: rebuild frontend 2024-01-11 21:07:57 +01:00
robingotz
60f208c172 fix: add uuid import 2024-01-11 21:05:00 +01:00
robingotz
75a509a082 fix: remove hex usage to generate uuids and iron out inconsistencies with previous backend responses 2024-01-11 20:56:21 +01:00
Max Blackmer
10865a4cb8 Merge branch 'main' into feature/global-logging
# Conflicts:
#	memgpt/config.py
2024-01-11 11:12:03 -05:00
Max Blackmer
abf4fb03bd [cpacker#319] fixed error with config with improper include in config.py
added test_log.py. for testing global logging in log.py
2024-01-11 10:44:20 -05:00
robingotz
7a61f2e748 chore: rebuild chatui 2024-01-11 14:49:46 +01:00
robingotz
619921d97c fix: return agents instead of agent_names from server's list_agents function 2024-01-11 14:49:46 +01:00
cpacker
a150db65f0 updated client code to match refactored server code 2024-01-11 14:49:46 +01:00
Robin Goetz
55f610bec1 feat: Next iteration of chatui (#652)
* feat: new iteration of chatui - beware it is still buggy

added some error handling, but I believe this still needs a lot of improvements.
added timestamps for when messages are sent.
when changing to a new agent the agent initiates the conversation.
persisting messages for now. Storing them in localstorage so users can see their
history and don't lose it on reload. replacing this with intelligent fetching asap.

* chore: build frontend
2024-01-11 14:49:46 +01:00
Charles Packer
93a897b43c feat: another iteration of chat web UI (#648)
* autogenerate openapi file on server startup

* added endpoint for paginated retrieval of in-context agent messages

* missing diff

* added ability to pass system messages via message endpoint

* patched bad depends into queries to fix the param info not showing up in get requests, fixed some bad copy paste
2024-01-11 14:49:44 +01:00
Charles Packer
83973ecfc8 feat: Update REST API (#647)
* adding docstrings + pydantic models to rest api for autogenerating the openapi documentation

* add tags to all endpoitns

* updated docstrings, added response type, patched runtime error
2024-01-11 14:48:10 +01:00
Robin Goetz
b573e8cab1 feat: next iteration of chatui (#642)
* feat: add dark mode & make minor UI improvements

added dark mode toggle & picked a color scheme that is closer to the memgpt icons
cleaned up the home page a little bit.

* feat: add thinking indicator & make minor UI improvements

we now show a thinking while the current message is loading.
removed status indicator as we do not work with websockets anymore.
also adjusted some of the chat styles to better fit the new theme.

* feat: add memory viewer and allow memory edit

* chore: build frontend
2024-01-11 14:47:51 +01: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
Charles Packer
605cf9fe65 fix(server): handle null key string in utils (check_null_key) (#789) 2024-01-10 23:20:06 -08:00
Charles Packer
f045c3515c feat: add_function and remove_function commands (#784) 2024-01-10 23:19:14 -08:00
Sarah Wooders
9b2d794de6 reformat 2024-01-10 20:21:53 -08:00
Sarah Wooders
e4a18c374e passing tests 2024-01-10 20:20:16 -08:00
Sarah Wooders
2f84caa817 fix archival reference 2024-01-10 19:47:39 -08:00
Tom Bedor
0c0f269453 feat: add_function and remove_function commands
Allows for dynamic editing of user defined functions.

Disallows removing functions that are defined by MemGPT itself.
2024-01-11 00:38:40 +00:00
Sarah Wooders
35aa6b46b4 cleanup source loading code 2024-01-09 19:19:18 -08:00
Sarah Wooders
d331c71ec3 remove AgentConfig imports 2024-01-09 11:38:46 -08:00
Sarah Wooders
841d47c462 Remove usage of agent_config from agent.py 2024-01-09 11:22:39 -08:00
Sarah Wooders
471005efed Fix CLI formatting 2024-01-08 16:58:59 -08:00
Sarah Wooders
04b40c677f Clear out archival and recall memory stores on agent deletion 2024-01-08 16:55:00 -08:00