Commit Graph

31 Commits

Author SHA1 Message Date
Sarah Wooders
ec2bda4966 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
dab47001a9 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
Charles Packer
fe2d8b2b2f add ollama support (#314)
* untested

* patch

* updated

* clarified using tags in docs

* tested ollama, working

* fixed template issue by creating dummy template, also added missing context length indicator

* moved count_tokens to utils.py

* clean
2023-11-06 15:11:22 -08:00
Charles Packer
5ac8635446 cleanup #326 (#333) 2023-11-06 12:57:19 -08:00
borewik
dbbb3fc14b Update chat_completion_proxy.py (#326)
grammar_name Has to be defined, if not there's an issue with line 92
2023-11-06 12:53:17 -08:00
Charles Packer
e90c00ad63 Add grammar-based sampling (for webui, llamacpp, and koboldcpp) (#293)
* add llamacpp server support

* use gbnf loader

* cleanup and warning about grammar when not using llama.cpp

* added memgpt-specific grammar file

* add grammar support to webui api calls

* black

* typo

* add koboldcpp support

* no more defaulting to webui, should error out instead

* fix grammar

* patch kobold (testing, now working) + cleanup log messages

Co-Authored-By: Drake-AI <drake-ai@users.noreply.github.com>
2023-11-04 12:02:44 -07:00
Charles Packer
fde0087a19 Patch summarize when running with local llms (#213)
* trying to patch summarize when running with local llms

* moved token magic numbers to constants, made special localllm exception class (TODO catch these for retry), fix summarize bug where it exits early if empty list

* missing file

* raise an exception on no-op summary

* changed summarization logic to walk forwards in list until fraction of tokens in buffer is reached

* added same diff to sync agent

* reverted default max tokens to 8k, cleanup + more error wrapping for better error messages that get caught on retry

* patch for web UI context limit error propogation, using best guess for what the web UI error message is

* add webui token length exception

* remove print

* make no wrapper warning only pop up once

* cleanup

* Add errors to other wrappers

---------

Co-authored-by: Vivian Fang <hi@vivi.sh>
2023-11-02 23:44:02 -07:00
Vivian Fang
5a60e92e8d Support for MemGPT + Autogen + Local LLM (#231)
* various fixes to get autogen working again

* MemGPT+Autogen+Local LLM example working

Co-Authored-By: nmx0 <nmx0@users.noreply.github.com>

* propagate model to other memgpt_agent constructor

* fix agent_groupchat

* tested on lm studio

---------

Co-authored-by: nmx0 <nmx0@users.noreply.github.com>
Co-authored-by: cpacker <packercharles@gmail.com>
2023-11-01 00:14:40 -07:00
Charles Packer
cc84d46d8b added more clear warnings for when HOST and HOST_TYPE are not set (#202) 2023-10-30 14:14:52 -07:00
Charles Packer
e47336ed48 black format patch for zephyr pr 2023-10-29 21:34:32 -07:00
Kamelowy
11d576f7e6 New wrapper for Zephyr models + little fix in memory.py (#183)
* VectorIndex -> VectorStoreIndex

VectorStoreIndex is imported but non-existent VectorIndex is used.

* New wrapper for Zephyr family of models.

With inner thoughts.

* Update chat_completion_proxy.py for Zephyr Wrapper
2023-10-29 21:17:01 -07:00
Charles Packer
78cb676cd2 LM Studio inference server support (#167)
* updated airo wrapper to catch specific case where extra closing } is missing

* added lmstudio support
2023-10-28 18:30:35 -07:00
cpacker
e41433f5e3 fix 2023-10-25 12:56:12 -07:00
Charles Packer
2c7a87a599 cleanup
Co-authored-by: Vivian Fang <v.fang@berkeley.edu>

cleanup

added missing file

added updated inner mono

missing stop token

cleanup

Update README.md
2023-10-25 12:50:46 -07:00
Vivian Fang
3b0aa370fc Revert "cleanup"
This reverts commit a7e06d0acc1b69b311fb16e386c4867337fe76f8.
2023-10-25 12:44:44 -07:00
Vivian Fang
bc81cdcef4 Revert "Revert "cleanup""
This reverts commit 6cd2a0049b02643ef800f7c2ddb45a1f4bd5babf.
2023-10-25 12:42:35 -07:00
Vivian Fang
9eb7cc6f14 Revert "Revert "cleanup""
This reverts commit f7a954015b7475b05436f106ba9eaf206a4538fe.
2023-10-25 12:42:29 -07:00
Vivian Fang
0802a0f881 Revert "Merge pull request #117 from cpacker/cleanup"
This reverts commit 3e6ab1e3174b38c8c52217f8a97939f4f20548db, reversing
changes made to f7a954015b7475b05436f106ba9eaf206a4538fe.
2023-10-25 12:40:54 -07:00
Charles Packer
cdd7ad40dd cleanup 2023-10-25 01:04:55 -07:00
Vivian Fang
069b55faa0 Revert "cleanup"
This reverts commit a7e06d0acc1b69b311fb16e386c4867337fe76f8.
2023-10-25 01:03:04 -07:00
Vivian Fang
8c3409cf02 Revert "cleanup"
This reverts commit 85d9fba811f237fc0c625e920d4ee5995a9308f6, reversing
changes made to a7e06d0acc1b69b311fb16e386c4867337fe76f8.
2023-10-25 01:02:43 -07:00
Charles Packer
2eb2496a28 cleanup 2023-10-25 00:58:29 -07:00
Charles Packer
59b58cee39 cleanup 2023-10-25 00:57:32 -07:00
Charles Packer
e6a0a746bb inner monologue airo parser 2023-10-24 01:39:56 -07:00
Charles Packer
0e1fdcd360 hotfix 2 2023-10-23 02:20:56 -07:00
Charles Packer
2b2da82307 hotfix 2023-10-23 02:10:55 -07:00
Charles Packer
a49731d714 typo 2023-10-23 00:44:43 -07:00
Charles Packer
3d2b4c7489 default to webui if BACKEND_TYPE is not set 2023-10-23 00:43:47 -07:00
Charles Packer
faaa9a04fa refactored + updated the airo wrapper a bit 2023-10-23 00:41:10 -07:00
Charles Packer
f4ae08f6f5 add comment about no inner mono + blackified the code 2023-10-22 23:59:46 -07:00
Charles Packer
8484f0557d basic proof of concept tested on airoboros 70b 2.1 2023-10-22 22:52:24 -07:00