Commit Graph

3426 Commits

Author SHA1 Message Date
Hans Raaf
71d696dc9e I added a "/retry" command to retry for getting another answer. (#188)
* 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>
2023-11-03 21:04:37 -07:00
Hans Raaf
dcdfa04fc0 I added commands to shape the conversation: (#218)
* 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>
2023-11-03 20:57:43 -07:00
Hans Raaf
9189a7bf26 I made dump showing more messages and added a count (the last x) (#204)
* 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>
2023-11-03 20:47:23 -07:00
Charles Packer
94893b4bd5 try to patch hanging test (#295)
* try to patch hanging test

* add a timeout on the test
2023-11-03 19:11:29 -07:00
Vivian Fang
1871823c99 hotfix DummyArchivalMemoryWithFaiss 2023-11-03 16:41:06 -07:00
cpacker
e0ecd43d96 hotfix 2023-11-03 16:25:39 -07:00
Sarah Wooders
b9ce763fda VectorDB support (pgvector) for archival memory (#226) 2023-11-03 16:19:15 -07:00
Sarah Wooders
c1fd8d6df1 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
Charles Packer
25dd225d04 strip '/' and use osp.join (Windows support) (#283)
* 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>
2023-11-03 13:54:29 -07:00
Sarah Wooders
62c1128252 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
6b4008c72e more stop tokens (#288) 2023-11-03 12:25:37 -07:00
tractorjuice
908e6d2dcd Update openai_tools.py to use delay (#159)
* Update openai_tools.py

Updated to use the 'delay'

* also use delay instead of 62 in async completions
2023-11-03 09:46:40 -07:00
Sarah Wooders
3fead07dc2 Fix --data-source in README 2023-11-03 08:55:17 -07:00
Vivian Fang
81f33f94a0 Bump version to 0.1.17 2023-11-03 00:21:08 -07:00
Charles Packer
437306388f Improvements to JSON handling for local LLMs (#269)
* some extra json hacks

* add 'smart' json loader to other wrapers

* added chatml related stop tokens by default
2023-11-03 00:18:31 -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
Bozhao
4789027c06 Fix typo in system base prompt (#189) 2023-11-02 23:37:52 -07:00
cpacker
c2c4b87342 cleanup 2023-11-02 22:37:17 -07:00
Charles Packer
ddc510306d typos (#268) 2023-11-02 22:33:25 -07:00
Vivian Fang
6f188cffc4 Allow loading in a directory non-recursively (#246) 2023-11-02 10:04:01 -07:00
Robin Goetz
30bb866142 fix: LocalArchivalMemory prints ref_doc_info on if not using EmptyIndex (#240)
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.
2023-11-01 18:45:04 -07:00
Vivian Fang
94fbb76596 Update README.md 2023-11-01 18:37:36 -07:00
Vivian Fang
b9c229de35 Update README.md 2023-11-01 18:32:19 -07:00
Vivian Fang
467ec5537e Typo in interface 2023-11-01 18:12:49 -07:00
Charles Packer
77fd987f2a 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
Charles Packer
438d8e8cee Update README.md 2023-11-01 16:46:08 -07:00
Vivian Fang
d7d6fbc42a Run tests on PRs to main 2023-11-01 13:57:21 -07:00
Vivian Fang
a42d4341a2 Run tests on basic-tests branch 2023-11-01 13:52:55 -07:00
Vivian Fang
bd5320b5dd Update README.md 2023-11-01 02:33:48 -07:00
Charles Packer
66f0d4336d Update README.md 2023-11-01 02:23:51 -07:00
Vivian Fang
80dc7a3154 Bump version to 0.1.16 2023-11-01 02:18:26 -07:00
cpacker
205226ea5e bump trunc length assuming mistral 2023-11-01 02:11:45 -07:00
Vivian Fang
79b72fd7ae await async_get_embeddings_with_backoff (#239) 2023-11-01 01:43:17 -07:00
Charles Packer
8e35c44881 fixed load loading from wrong directory (#237)
* fixed load loading from wrong directory

* typos
2023-11-01 01:28:32 -07:00
Charles Packer
f889f24643 Allow MemGPT to read/write text files + make HTTP requests (#174)
* added file read/write

* added HTTP requests

* black on utils.py
2023-11-01 01:08:44 -07:00
Sarah Wooders
f765290cfb Update README for CLI changes (#207)
* 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
2023-11-01 01:03:41 -07:00
Charles Packer
250252f105 len needs to be implemented in all memory classes (#236)
* len needs to be implemented in all memory classes so that the pretty print of memory shows statistics

* stub
2023-11-01 01:02:25 -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
8e6b0d6f6f Update tests.yml
temporarily disable broken test
2023-11-01 00:14:16 -07:00
Charles Packer
884a9edac7 Update issue templates 2023-10-31 16:36:22 -07:00
Charles Packer
0f6a993f37 Update bug_report.md 2023-10-31 16:35:03 -07:00
Charles Packer
8cd66e772c Update bug_report.md 2023-10-31 16:32:53 -07:00
Charles Packer
0cc15c9165 Update bug_report.md 2023-10-31 16:32:27 -07:00
Charles Packer
731671972f Update bug_report.md 2023-10-31 16:31:37 -07:00
Charles Packer
7095e2581c Update issue templates 2023-10-31 16:30:46 -07:00
Charles Packer
351dc4ef22 Update tests.yml 2023-10-31 15:31:56 -07:00
Charles Packer
6f8db9b7f3 Create tests.yml 2023-10-31 15:14:37 -07:00
Vivian Fang
bcb9f7f3c7 Break out of loop if agent.step succeeds 2023-10-31 14:34:32 -07:00
Sarah Wooders
c9225d329e 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
Charles Packer
4fc88f95f1 Update black_format.yml 2023-10-31 13:47:41 -07:00