Commit Graph

320 Commits

Author SHA1 Message Date
Charles Packer
8cc1ed0f59 updated local APIs to return usage info (#585)
* updated APIs to return usage info

* tested all endpoints
2023-12-13 21:11:20 -08:00
Charles Packer
2048ba179b 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
b7427e2de7 API server refactor + REST API (#593)
* init server refactor

* refactored websockets server/client code to use internal server API

* added intentional fail on test

* update workflow to try and get test to pass remotely

* refactor to put websocket code in a separate subdirectory

* added fastapi rest server

* add error handling

* modified interface return style

* disabled certain tests on remote

* added SSE response option for user_message

* fix ws interface test

* fallback for oai key

* add soft fail for test when localhost is borked

* add step_yield for all server related interfaces

* extra catch

* update toml + lock with server add-ons (add uvicorn+fastapi, move websockets to server extra)

* regen lock file

* added pytest-asyncio as an extra in dev

* add pydantic to deps

* renamed CreateConfig to CreateAgentConfig

* fixed POST request for creating agent + tested it
2023-12-11 15:08:42 -08:00
Sarah Wooders
033d9d61f4 Bump version 0.2.7 (#607) 2023-12-10 22:36:19 -08:00
Charles Packer
0d8b95e2a7 AutoGen misc fixes (#603)
* don't add anything except for assistant messages to the global autogen message historoy

* properly format autogen messages when using local llms (allow naming to get passed through to the prompt formatter)

* add extra handling of autogen's name field in step()

* comments
2023-12-10 20:52:21 -08:00
Charles Packer
b2e88da277 Patch azure embeddings + handle azure deployments properly (#594)
* Fix bug where embeddings endpoint was getting set to deployment, upgraded pinned llama-index to use new version that has azure endpoint

* updated documentation

* added memgpt example for openai

* change wording to match configure
2023-12-08 16:31:43 -08:00
Charles Packer
52d4befdba fix runtime error (#586) 2023-12-05 23:01:37 -08:00
Sarah Wooders
6a155dfc90 Chroma storage integration (#285) 2023-12-05 17:49:00 -08:00
Charles Packer
1d915cce86 allow passing skip_verify to autogen constructors (#581)
* allow passing skip_verify to autogen constructors

* added flag to examples with a NOTE, also added to docs
2023-12-05 13:28:33 -08:00
Sarah Wooders
03dee5bf0c Bump version to 0.2.6 (#573) 2023-12-04 23:04:33 -08:00
Charles Packer
b65980e2b3 add back dotdict for backcompat (#572) 2023-12-04 23:02:22 -08:00
Charles Packer
3fb8e62135 Add safety check to pop (#575)
* Add safety check to pop

* typo
2023-12-04 14:18:36 -08:00
Charles Packer
f2a2942c66 sort agents by directory-last-modified time (#574)
* sort agents by directory-last-modified time

* only save agent config when agent is saved

---------

Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2023-12-04 14:16:03 -08:00
Claudio Cambra
14fbfa1406 Fix crash from bad key access into response_message without function_call (#437)
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-12-04 13:58:36 -08:00
Charles Packer
4b8ce55280 Update autogen.md to include Azure config example + patch for pyautogen>=0.2.0 (#555)
* Update autogen.md

* in groupchat example add an azure elif

* fixed missing azure mappings + corrected the gpt-4-turbo one

* Updated MemGPT AutoGen agent to take credentials and store them in the config (allows users to use memgpt+autogen without running memgpt configure), also patched api_base kwarg for autogen >=v0.2

* add note about 0.2 testing

* added overview to autogen integration page

* default examples to openai, sync config header between the two main examples, change speaker mode to round-robin in 2-way chat to supress warning

* sync config header on last example (not used in docs)

* refactor to make sure we use existing config when writing out extra credentials

* fixed bug in local LLM where we need to comment out api_type (for pyautogen>=0.2.0)
2023-12-04 12:49:08 -08:00
Charles Packer
df999de4c1 use a consistent warning prefix across codebase (#569) 2023-12-04 11:38:51 -08:00
Charles Packer
74e7826100 fix cannot import name 'EmptyIndex' from 'llama_index' (#558) 2023-12-01 18:09:29 -08:00
Sarah Wooders
9f9660bbf7 bump version (#551) 2023-12-01 16:10:58 -08:00
Sarah Wooders
f7b4213ef8 Fix vLLM endpoint to have correct suffix (#548)
* minor fix

* fix vllm endpoint

* fix docs
2023-12-01 14:11:05 -08:00
Charles Packer
b741b601fb Update AutoGen documentation and notebook example (#540)
* Update AutoGen documentation

* Update webui.md

* Update webui.md

* Update lmstudio.md

* Update lmstudio.md

* Update mkdocs.yml

* Update README.md

* Update README.md

* Update README.md

* Update autogen.md

* Update local_llm.md

* Update local_llm.md

* Update autogen.md

* Update autogen.md

* Update autogen.md

* refreshed the autogen examples + notebook (notebook is untested)

* unrelated patch of typo I noticed

* poetry remove pyautogen, then manually removed autogen extra in .toml

* add pdf dependency

---------

Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2023-11-30 17:45:04 -08:00
Sarah Wooders
2857ae1c81 Remove usage of BACKEND_TYPE (#539) 2023-11-30 14:18:25 -08:00
Sarah Wooders
2d23370930 Removing dead code + legacy commands (#536) 2023-11-30 13:37:11 -08:00
Charles Packer
5e7676e133 Remove openai package and migrate to requests (#534) 2023-11-30 13:00:13 -08:00
Ayush Chaurasia
4a2a28981b LanceDB integration bug fixes and improvements (#528)
* fixes

* update

* lint
2023-11-30 10:32:29 -08:00
Charles Packer
a367ee4072 patched a bug where outputs of a regex extraction weren't getting cast back to string, causing an issue when the dict was then passed to json.dumps() (#533) 2023-11-29 12:57:05 -08:00
Sarah Wooders
b05b09439f Add user field for vLLM endpoint (#531) 2023-11-29 12:30:42 -08:00
Claudio Cambra
2ec6c512c4 Fix class names used in persistence manager logging (#503)
* Fix class names used in persistence manager logging

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>

* Use self.__class__.__name__ for logging in different persistence managers

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>

---------

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
2023-11-28 23:11:11 -08:00
Charles Packer
f4a1455c24 Clean memory error messages (#523)
* Raise a custom keyerror instead of basic keyerror to clarify issue to LLM processor

* remove self value from error message passed to LLM processor

* simplify error message propogated to llm processor
2023-11-27 16:41:42 -08:00
Sarah Wooders
ed356dd82c Add support for HuggingFace Text Embedding Inference endpoint for embeddings (#524) 2023-11-27 16:28:49 -08:00
Sarah Wooders
fe6be5c3bd Add warning if no data sources loaded on /attach command (#513)
* minor fix

* add warn instead of error for no data sources
2023-11-27 13:00:23 -08:00
Charles Packer
04e6d548c3 extra arg being passed causing a runtime error (#517) 2023-11-27 11:36:26 -08:00
Charles Packer
188236b457 add core memory char limits to text shown in core memory (#508)
* add core memory char limits to text shown in core memory

* include char limit in xml tag

* add flag to allow reverting to old version
2023-11-26 20:00:01 -08:00
Charles Packer
f92d8dfc8b add a longer prefix that to the default wrapper (#510)
* add a longer prefix that to the default wrapper (not just opening brace, but up to 'function: ' part since that is always present)

* drop print
2023-11-26 19:59:49 -08:00
Charles Packer
2121130a88 add new manual json parser meant to catch send_message calls with trailing bad extra chars (#509)
* add new manual json parser meant to catch send_message calls with stray trailing chars, patch json error passing

* typo
2023-11-25 16:30:12 -08:00
Sarah Wooders
58bdb1ebd0 update version (#497) 2023-11-22 08:58:24 -08:00
Charles Packer
7712a06ffd Fixes bugs with AutoGen implementation and exampes (#498)
* patched bugs in autogen agent example, updated autogen agent creation to follow agentconfig paradigm

* more fixes

* black

* fix bug in autoreply

* black

* pass default autoreply through to the memgpt autogen conversibleagent subclass so that it doesn't leave empty messages which can trigger errors in local llm backends like lmstudio
2023-11-21 19:15:28 -08:00
Charles Packer
823a3e1694 Add error handling during linking imports (#495)
* Add error handling during linking imports

* correct typo + make error message even more explicit

* deadcode
2023-11-21 15:16:16 -08:00
Charles Packer
de0ccea181 vLLM support (#492)
* init vllm (not tested), uses POST API not openai wrapper

* add to cli config list

* working vllm endpoint

* add model configuration for vllm

---------

Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2023-11-21 15:16:03 -08:00
Max Blackmer, CSM
d72edb6a99 ANNA, an acronym for Adaptive Neural Network Assistant. Which acts as your personal research assistant really good with archival documents and research. (#494) 2023-11-20 11:43:08 -08:00
Charles Packer
8a7a64c7f9 patch web UI (#484)
* patch web UI

* set truncation_length
2023-11-19 14:56:10 -08:00
Charles Packer
9989fd9a52 Fix #487 (summarize call uses OpenAI even with local LLM config) (#488)
* use new chatcompletion function that takes agent config inside of summarize

* patch issue with model now missing
2023-11-19 14:54:12 -08:00
Charles Packer
4ba4c02fa1 Remove .DS_Store from agents list (#485) 2023-11-19 14:35:51 -08:00
sahusiddharth
351f8094b5 Docs: Fix typos (#477) 2023-11-17 15:12:14 -08:00
Prashant Dixit
11e11bfac4 Lancedb storage integration (#455) 2023-11-17 11:36:30 -08:00
Charles Packer
86ac4ff4de updated websocket protocol and server (#473) 2023-11-16 22:50:00 -08:00
Charles Packer
576795ffdb move webui to new openai completions endpoint, but also provide existing functionality via webui-legacy backend (#468) 2023-11-15 23:08:30 -08:00
Charles Packer
b592328a71 bugfix for linking functions from ~/.memgpt/functions (#463) 2023-11-15 15:56:42 -08:00
Sarah Wooders
f781d4426a Set service context for llama index in local.py (#462)
* mark depricated API section

* add readme

* add readme

* add readme

* add readme

* add readme

* add readme

* add readme

* add readme

* add readme

* CLI bug fixes for azure

* check azure before running

* Update README.md

* Update README.md

* bug fix with persona loading

* remove print

* make errors for cli flags more clear

* format

* fix imports

* fix imports

* add prints

* update lock

* remove asserts

* bump version

* set global context for llama index
2023-11-15 15:39:35 -08:00
Sarah Wooders
2bd7773f25 [version] bump version to 0.2.3 (#457) 2023-11-15 10:21:10 -08:00
Oliver Smith
a9b5a3d806 When default_mode_endpoint has a value, it needs to become model_endpoint. (#452)
Co-authored-by: Oliver Smith <oliver.smith@superevilmegacorp.com>
2023-11-15 01:18:23 -08:00