Commit Graph

3426 Commits

Author SHA1 Message Date
robingotz
7a61f2e748 chore: rebuild chatui 2024-01-11 14:49:46 +01:00
robingotz
bd4044e1a8 chore: upgrade follow-redirects dependency 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
Charles Packer
771eeb6a02 fix: deprecate AgentConfig in favor of AgentState. (#803) 2024-01-10 20:23:47 -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
d118774bb7 fix: tests should only use "openai" quickstart if `OPENAI_API_KEY is set (#801) 2024-01-09 19:13:16 -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
ifsheldon
240fee4973 fix: Fix broken doc due to refactor (#798) 2024-01-09 11:03:25 -08:00
Charles Packer
d01eedd37d fix: Various fixes to support source/agent deletion (#797) 2024-01-08 17:02:04 -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
Sarah Wooders
5485c744c9 Add support for deleting sources 2024-01-08 16:49:04 -08:00
Sarah Wooders
7b25aa94b0 Add warning if user_id is not found for 'memgpt load' 2024-01-08 16:45:06 -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
tezer
5cf48ac88a fix(server): handle null key string in utils (check_null_key)
Ensure that the `shorten_key` function in `utils.py` returns the key string itself when it is null or empty, preventing further processing that could lead to errors.
2024-01-06 00:36:13 +02:00
Charles Packer
97e8961528 fix: Update message schema / data type to match OAI tools style (#783)
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2024-01-04 15:05:43 -08:00
Charles Packer
1621774536 refactor!: Refactoring storage connectors to support multi-user DB storage for recall memory + metadata (#708) 2024-01-04 13:14:13 -08:00
cpacker
3c930de917 Merge branch 'main' into cherry-pick-storage-refactor 2024-01-04 13:11:01 -08:00
Sarah Wooders
89fdcfdadc Run black 2024-01-04 13:04:21 -08:00
Sarah Wooders
a916852ad6 Remove stray prints 2024-01-04 13:02:09 -08:00
cpacker
07f422da74 added comments about tool fields 2024-01-04 11:53:06 -08:00
Sarah Wooders
ee5ece6866 Only create single table with create_all, not all 2024-01-04 11:38:31 -08:00
cpacker
e175c204b2 try another patch to recreate declarative base 2024-01-04 11:33:44 -08:00
cpacker
b525597c6a fix black 2024-01-04 11:28:31 -08:00
cpacker
e5be806247 Merge branch 'cherry-pick-storage-refactor' of github.com:cpacker/MemGPT into cherry-pick-storage-refactor 2024-01-04 11:26:41 -08:00
cpacker
5b4875834f Add extra code for wiping sqlalchemy globals 2024-01-04 11:26:35 -08:00
Sarah Wooders
2bc53ad66b Add assert for postgres storage connector column type 2024-01-04 11:20:03 -08:00
Sarah Wooders
f11f098067 Remove deprecation warnings for sqlalchemy 2024-01-04 11:03:06 -08:00
Sarah Wooders
b117cce693 Upgrade pytest version 2024-01-04 10:42:11 -08:00
Sarah Wooders
722b50f818 All tests passing locally 2024-01-04 10:34:38 -08:00
Charles Packer
9f0c796305 patch SAWarning (#782) 2024-01-04 09:54:52 -08:00
Sarah Wooders
a9853e9077 Remove incorrect dialect db model loading from sqlite 2024-01-04 09:50:51 -08:00
Sarah Wooders
6511dcaa7d Temporarily add prints 2024-01-04 09:43:19 -08:00
Sarah Wooders
5b850c937f Cleanup code for converting dialect into vector storage type 2024-01-04 09:29:24 -08:00
Sarah Wooders
ed101934da Avoid usage of Vector type for when not using postgres 2024-01-04 09:23:04 -08:00