- Removed repeating every user message like bein in debug mode
- Re-added the "dump" flag for the user message, to make it look nicer.
I may "reformat" other message too when dumping, but that was what
sticked out to me as unpleasant.
* 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>
* I added a "/retry" command to retry for getting another answer.
- Implemented to pop messages until hitting the last user message. Then
extracting the users last message and sending it again. This will also
work with state files and after manually popping messages.
- Updated the README to include /retry
- Update the README for "pop" with parameter and changed default to 3 as
this will pop "function/assistant/user" which is the usual turn
around.
* disclaimer
---------
Co-authored-by: Charles Packer <packercharles@gmail.com>
* I added commands to shape the conversation:
`/rethink <text>` will change the internal dialog of the last assistant message.
`/rewrite <text>` will change the last answer of the assistant.
Both commands can be used to change how the conversation continues in
some pretty drastic and powerfull ways.
* remove magic numbers
* add disclaimer
---------
Co-authored-by: cpacker <packercharles@gmail.com>
* I made dump showing more message and added a count (the last x)
There seem to be some changes about the implementation so that the
current dump message helper functions do not show a lot of useful info.
I changed it so that you can `dump 5` (last 5 messages) and that it will
print user readable output. This lets you get some more understanding about
what is going on.
As some messages are still not shown I also show the index (reverse) of the
printed message, so one can see what to "pop" to reach a special point
without geting into the drumpraw.
* black
* patch
---------
Co-authored-by: Charles Packer <packercharles@gmail.com>
* strip '/' and use osp.join
* grepped for MEMGPT_DIR, found more places to replace '/'
* typo
* grep pass over filesep
---------
Co-authored-by: Vivian Fang <hi@vivi.sh>
* 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>
Currently, if you run the /memory command the application breaks if the LocalArchivalMemory
has no existing archival storage and defaults to the EmptyIndex. This is caused by EmptyIndex
not having a ref_doc_info implementation and throwing an Exception when that is used to print
the memory information to the console. This hot fix simply makes sure that we do not try to
use the function if using EmptyIndex and instead prints a message to the console indicating
an EmptyIndex is used.
* 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>