Commit Graph

39 Commits

Author SHA1 Message Date
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
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
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
Charles Packer
e65b5400c7
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
a3d300b897
Update documentation [local LLMs, presets] (#453)
* updated local llm documentation

* updated cli flags to be consistent with documentation

* added preset documentation

* update test to use new arg

* update test to use new arg
2023-11-15 01:02:57 -08:00
Sarah Wooders
47811c73a0
Update config to include memgpt_version and re-run configuration for old versions on memgpt run (#450)
* 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

* store config versions and force update in some cases
2023-11-14 22:50:24 -08:00
Sarah Wooders
28514da5df
Refactor config + determine LLM via config.model_endpoint_type (#422)
* mark depricated API section

* 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

* update config fields

* cleanup config loading

* commit

* remove asserts

* refactor configure

* put into different functions

* add embedding default

* pass in config

* fixes

* allow overriding openai embedding endpoint

* black

* trying to patch tests (some circular import errors)

* update flags and docs

* patched support for local llms using endpoint and endpoint type passed via configs, not env vars

* missing files

* fix naming

* fix import

* fix two runtime errors

* patch ollama typo, move ollama model question pre-wrapper, modify question phrasing to include link to readthedocs, also have a default ollama model that has a tag included

* disable debug messages

* made error message for failed load more informative

* don't print dynamic linking function warning unless --debug

* updated tests to work with new cli workflow (disabled openai config test for now)

* added skips for tests when vars are missing

* update bad arg

* revise test to soft pass on empty string too

* don't run configure twice

* extend timeout (try to pass against nltk download)

* update defaults

* typo with endpoint type default

* patch runtime errors for when model is None

* catching another case of 'x in model' when model is None (preemptively)

* allow overrides to local llm related config params

* made model wrapper selection from a list vs raw input

* update test for select instead of input

* Fixed bug in endpoint when using local->openai selection, also added validation loop to manual endpoint entry

* updated error messages to be more informative with links to readthedocs

* add back gpt3.5-turbo

---------

Co-authored-by: cpacker <packercharles@gmail.com>
2023-11-14 15:58:19 -08:00
Charles Packer
8fdc3a29da
always cast config.context_window to int before use (#444)
* always cast config.context_window to int before use

* extra code to be super safe if self.config.context_window is somehow None
2023-11-14 15:12:00 -08:00
Charles Packer
7a2fe850ed
WebSocket interface and basic server.py process (#399) 2023-11-13 17:30:24 -08:00
Charles Packer
b789549d02
Configurable presets to support easy extension of MemGPT's function set (#420)
* partial

* working schema builder, tested that it matches the hand-written schemas

* correct another schema diff

* refactor

* basic working test

* refactored preset creation to use yaml files

* added docstring-parser

* add code for dynamic function linking in agent loading

* pretty schema diff printer

* support pulling from ~/.memgpt/functions/*.py

* clean

* allow looking for system prompts in ~/.memgpt/system_prompts

* create ~/.memgpt/system_prompts if it doesn't exist

* pull presets from ~/.memgpt/presets in addition to examples folder

* add support for loading agent configs that have additional keys

---------

Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2023-11-13 10:43:28 -08:00
Sarah Wooders
e9da84e6d7
[fix] remove asserts for OPENAI_API_BASE (#432)
* 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
2023-11-12 14:34:00 -08:00
Anjalee Sudasinghe
558968af62
fix memgptagent attach docs error (#427)
Co-authored-by: Anjalee Sudasinghe <anjalee@codegen.net>
2023-11-12 13:49:11 -08:00
Sarah Wooders
3b3e8b48a5
add errors to make sure envs set correctly (#418) 2023-11-10 12:45:32 -08:00
Charles Packer
cb50308ef6
Fix max tokens constant (#374)
* stripped LLM_MAX_TOKENS constant, instead it's a dictionary, and context_window is set via the config (defaults to 8k)

* pass context window in the calls to local llm APIs

* safety check

* remove dead imports

* context_length -> context_window

* add default for agent.load

* in configure, ask for the model context window if not specified via dictionary

* fix default, also make message about OPENAI_API_BASE missing more informative

* make openai default embedding if openai is default llm

* make openai on top of list

* typo

* also make local the default for embeddings if you're using localllm instead of the locallm endpoint

* provide --context_window flag to memgpt run

* fix runtime error

* stray comments

* stray comment
2023-11-09 17:59:03 -08:00
Vivian Fang
e5c0e1276b
Remove AsyncAgent and async from cli (#400)
* Remove AsyncAgent and async from cli

Refactor agent.py memory.py

Refactor interface.py

Refactor main.py

Refactor openai_tools.py

Refactor cli/cli.py

stray asyncs

save

make legacy embeddings not use async

Refactor presets

Remove deleted function from import

* remove stray prints

* typo

* another stray print

* patch test

---------

Co-authored-by: cpacker <packercharles@gmail.com>
2023-11-09 14:51:12 -08:00
Sarah Wooders
e9a2f8e762
Replace memgpt run flags error with warning + remove custom embedding endpoint option + add agent create time (#364) 2023-11-09 09:10:17 -08:00
Sarah Wooders
e5002192b4
Add support for larger archival memory stores (#359) 2023-11-09 09:09:57 -08:00
Sarah Wooders
c75224206e
Add memgpt version command and package version (#336) 2023-11-06 13:38:50 -08:00
Sarah Wooders
2492db6b59
VectorDB support (pgvector) for archival memory (#226) 2023-11-03 16:19:15 -07:00
Sarah Wooders
8a5aba508c
Make CLI agent flag errors more clear, and dont throw error if flags dont contradict existing agent config (#290) 2023-11-03 14:13:44 -07:00
Sarah Wooders
f70300a8b0
Don't prompt for selecting existing agent if there is a --persona/human/model flag (#289) 2023-11-03 12:45:22 -07:00
Charles Packer
270913218a
Add basic tests that are run on PR/main (#228)
* make tests dummy to make sure github workflow is fine

* black test

* strip circular import

* further dummy-fy the test

* use pexpect

* need y

* Update tests.yml

* Update tests.yml

* added prints

* sleep before decode print

* updated test to match legacy flow

* revising test where it fails

* comment out enter your message check for now, pexpect seems to be stuck on only setting the bootup message

* weird now it's not showing Bootup sequence complete?

* added debug

* handle none

* allow more time

* loosen string check

* add enter after commands

* modify saved compontent snippet

* add try again check

* more sendlines

* more excepts

* test passing locally

* Update tests.yml

* dont clearline

* add EOF catch that seems to only happen on github actiosn (ubuntu) but not macos

* more eof

* try flushing

* add strip_ui flag

* fix archival_memory_search and memory print output

* Don't use questionary for input if strip_ui

* Run black

* Always strip UI if TEST is set

* Add another flush

* expect Enter your message

* more debug prints

* one more shot at printing debug info

* stray fore color in stripped ui

* tests pass locally

* cleanup

---------

Co-authored-by: Vivian Fang <hi@vivi.sh>
2023-11-01 17:01:45 -07:00
Sarah Wooders
de6f6e857f
Cli bug fixes (loading human/persona text, azure setup, local setup) (#222)
* 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

* revert readme

* remove print
2023-10-31 13:51:20 -07:00
Sarah Wooders
b7f9560bef
Refactoring CLI to use config file, connect to Llama Index data sources, and allow for multiple agents (#154)
* Migrate to `memgpt run` and `memgpt configure` 
* Add Llama index data sources via `memgpt load` 
* Save config files for defaults and agents
2023-10-30 16:47:54 -07:00