Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

clean docs (#543)

Charles Packer8323fb6ec383
diff --git a/docs/adding_wrappers.md b/docs/adding_wrappers.md
index d7a8c2a41..c4bc09001 100644
--- a/docs/adding_wrappers.md
+++ b/docs/adding_wrappers.md
@@ -1,5 +1,3 @@
-## Adding support for new LLMs + improving performance
-
!!! warning "MemGPT + local LLM failure cases"
When using open LLMs with MemGPT, **the main failure case will be your LLM outputting a string that cannot be understood by MemGPT**. MemGPT uses function calling to manage memory (eg `edit_core_memory(...)` and interact with the user (`send_message(...)`), so your LLM needs generate outputs that can be parsed into MemGPT function calls.
@@ -69,7 +67,7 @@ class Airoboros21Wrapper(LLMChatCompletionWrapper):
"""
```
-See full file [here](llm_chat_completion_wrappers/airoboros.py).
+See full file [here](https://github.com/cpacker/MemGPT/tree/main/memgpt/local_llm/llm_chat_completion_wrappers/airoboros.py).
---
@@ -88,5 +86,3 @@ In the future, more open LLMs and LLM servers (that can host OpenAI-compatable C
### What is this all this extra code for?
Because of the poor state of function calling support in existing ChatCompletion API serving code, we instead provide a light wrapper on top of ChatCompletion that adds parsers to handle function calling support. These parsers need to be specific to the model you're using (or at least specific to the way it was trained on function calling). We hope that our example code will help the community add additional compatability of MemGPT with more function-calling LLMs - we will also add more model support as we test more models and find those that work well enough to run MemGPT's function set.
-
-To run the example of MemGPT with Airoboros, you'll need to host the model behind some LLM web server (for example [webui](https://github.com/oobabooga/text-generation-webui#starting-the-web-ui)). Then, all you need to do is point MemGPT to this API endpoint by setting the environment variables `OPENAI_API_BASE` and `BACKEND_TYPE`. Now, instead of calling ChatCompletion on OpenAI's API, MemGPT will use it's own ChatCompletion wrapper that parses the system, messages, and function arguments into a format that Airoboros has been finetuned on, and once Airoboros generates a string output, MemGPT will parse the response to extract a potential function call (knowing what we know about Airoboros expected function call output).
diff --git a/docs/autogen.md b/docs/autogen.md
index b3b6eaf34..b6cc73755 100644
--- a/docs/autogen.md
+++ b/docs/autogen.md
@@ -4,8 +4,6 @@
You can also check the [GitHub discussion page](https://github.com/cpacker/MemGPT/discussions/65), but the Discord server is the official support channel and is monitored more actively.
-## MemGPT + Autogen
-
[examples/agent_groupchat.py](https://github.com/cpacker/MemGPT/blob/main/memgpt/autogen/examples/agent_groupchat.py) contains an example of a groupchat where one of the agents is powered by MemGPT.
If you are using OpenAI, you can also run it using the [example notebook](https://github.com/cpacker/MemGPT/blob/main/memgpt/autogen/examples/memgpt_coder_autogen.ipynb).
diff --git a/docs/cli_faq.md b/docs/cli_faq.md
index 1b7da1515..6fad8a6fe 100644
--- a/docs/cli_faq.md
+++ b/docs/cli_faq.md
@@ -29,7 +29,3 @@ No, ChatGPT Plus is a separate product from the OpenAI API. Paying for ChatGPT P
### I don't want to use OpenAI, can I still use MemGPT?
Yes, you can run MemGPT with your own LLMs. See our section on local LLMs for information on how to set them up with MemGPT.
-
-## Local LLMs
-
-### TODO
diff --git a/docs/functions.md b/docs/functions.md
index c75e91408..02abe7616 100644
--- a/docs/functions.md
+++ b/docs/functions.md
@@ -1,5 +1,3 @@
-## Giving MemGPT access to additional tools / functions
-
If you would like to give MemGPT the ability to call new tools or functions, you can write a Python `.py` file with the functions you want to add, and place it inside of `~/.memgpt/functions`. You can see the example function sets provided [here](https://github.com/cpacker/MemGPT/tree/main/memgpt/functions/function_sets).
As an example, we provide a preset called [`memgpt_extras`](https://github.com/cpacker/MemGPT/blob/main/memgpt/presets/examples/memgpt_extras.yaml) that includes additional functions to read and write from text files, as well as make HTTP requests:
diff --git a/docs/koboldcpp.md b/docs/koboldcpp.md
index ef4300987..ee39c041d 100644
--- a/docs/koboldcpp.md
+++ b/docs/koboldcpp.md
@@ -1,5 +1,3 @@
-### MemGPT + koboldcpp
-
1. Download + install [koboldcpp](https://github.com/LostRuins/koboldcpp/) and the model you want to test with
2. In your terminal, run `./koboldcpp.py <MODEL> -contextsize <CONTEXT_LENGTH>`
diff --git a/docs/llamacpp.md b/docs/llamacpp.md
index f49ca1b2d..554206192 100644
--- a/docs/llamacpp.md
+++ b/docs/llamacpp.md
@@ -1,5 +1,3 @@
-### MemGPT + llama.cpp
-
1. Download + install [llama.cpp](https://github.com/ggerganov/llama.cpp) and the model you want to test with
2. In your terminal, run `./server -m <MODEL> -c <CONTEXT_LENGTH>`
diff --git a/docs/lmstudio.md b/docs/lmstudio.md
index 5feb19a93..754f8244d 100644
--- a/docs/lmstudio.md
+++ b/docs/lmstudio.md
@@ -1,5 +1,3 @@
-### MemGPT + LM Studio
-
!!! warning "Important LM Studio settings"
**Context length**: Make sure that "context length" (`n_ctx`) is set (in "Model initialization" on the right hand side "Server Model Settings" panel) to the max context length of the model you're using (e.g. 8000 for Mistral 7B variants).
diff --git a/docs/local_llm_faq.md b/docs/local_llm_faq.md
index ab01214b1..c605886d7 100644
--- a/docs/local_llm_faq.md
+++ b/docs/local_llm_faq.md
@@ -1,55 +1,23 @@
### Problems getting MemGPT + local LLMs set up
-#### The OPENAI_API_BASE environment variable is not defined. Please set it in your environment.
-
-`OPENAI_API_BASE` is not set correctly. Set the variable using `export`, `set`, or `$Env:`, depending on your operating system.
-
-#### The BACKEND_TYPE environment variable is not defined. Please set it in your environment.
-
-`BACKEND_TYPE` is not set correctly. Set the variable using `export`, `set`, or `$Env:`, depending on your operating system.
-
-#### "Provided OPENAI_API_BASE value (...) must begin with http:// or https://"
-
-This happens when you have a typo in `OPENAI_API_BASE`.
-
-For example, don't do:
-```sh
-# This will trigger the error
-export OPENAI_API_BASE=localhost:5000
-```
-
-Instead do:
-```sh
-export OPENAI_API_BASE=http://localhost:5000
-```
-
#### "Unable to connect to host ...", "API call got non-200 response code"
This error happens when MemGPT tries to run the LLM on the remote server you specified, but the server isn't working as expected.
-For example, this error can happen when you have a typo in your `OPENAI_API_BASE`:
-```sh
-# OPENAI_API_BASE here should NOT have the extra '/v1' at the end
-export OPENAI_API_BASE=http://localhost:5001/v1
-export BACKEND_TYPE=webui
-```
+For example, this error can happen when you have a typo in your endpoint (notice the duplicate `/v1` in the URL):
```text
-Exception: API call got non-200 response code (code=400, msg={"error": {"message": "Missing required input", "code": 400, "type": "InvalidRequestError", "param": "context"}}) for address: http://localhost:5001/v1/api/v1/generate.Make sure that the web UI server is running and reachable at http://localhost:5001/v1/api/v1/generate.
+Exception: API call got non-200 response code (code=400, msg={"error": {"message": "Missing required input", "code": 400, "type": "InvalidRequestError", "param": "context"}}) for address: http://localhost:5001/v1/api/v1/generate. Make sure that the web UI server is running and reachable at http://localhost:5001/v1/api/v1/generate.
```
-Correcting the typo fixes this example error:
-```sh
-# OPENAI_API_BASE here should NOT have the extra '/v1' at the end
-export OPENAI_API_BASE=http://localhost:5001
-```
+Correcting the endpoint from `http://localhost:5001/v1` to `http://localhost:5001` (no `/v1` suffix) fixes the example error.
### Common errors while running MemGPT with local LLMs
-#### "Warning: no wrapper specified for local LLM, using the default wrapper (you can remove this warning by specifying the wrapper with --model)"
+#### "Warning: no wrapper specified for local LLM, using the default wrapper"
**You can ignore this warning.**
-This warning means that you did not specify a specific wrapper using the `--model` flag, so MemGPT is using the default wrapper. If you would like to silence this warning, specify a wrapper with `--model`.
+This warning means that you did not specify a specific wrapper using the `--model-wrapper` flag, so MemGPT is using the default wrapper. If you would like to silence this warning, specify a wrapper with `--model-wrapper` or during `memgpt configure`.
#### "Failed to parse JSON from local LLM response"
diff --git a/docs/ollama.md b/docs/ollama.md
index 7047ed734..87314fc4e 100644
--- a/docs/ollama.md
+++ b/docs/ollama.md
@@ -1,5 +1,3 @@
-### MemGPT + Ollama
-
!!! warning "Be careful when downloading Ollama models!"
Make sure to use tags when downloading Ollama models! Don't do `ollama run dolphin2.2-mistral`, do `ollama run dolphin2.2-mistral:7b-q6_K`.
diff --git a/docs/presets.md b/docs/presets.md
index ec5b29590..3113a3f15 100644
--- a/docs/presets.md
+++ b/docs/presets.md
@@ -1,5 +1,3 @@
-## Creating new MemGPT presets
-
MemGPT **presets** are a combination default settings including a system prompt and a function set. For example, the `memgpt_docs` preset uses a system prompt that is tuned for document analysis, while the default `memgpt_chat` is tuned for general chatting purposes.
You can create your own presets by creating a `.yaml` file in the `~/.memgpt/presets` directory. If you want to use a new custom system prompt in your preset, you can create a `.txt` file in the `~/.memgpt/system_prompts` directory.
diff --git a/docs/quickstart.md b/docs/quickstart.md
index 2f81c75d4..9d9ce1734 100644
--- a/docs/quickstart.md
+++ b/docs/quickstart.md
@@ -1,4 +1,4 @@
-## Installation
+### Installation
To install MemGPT, make sure you have Python installed on your computer, then run:
diff --git a/docs/webui.md b/docs/webui.md
index 8eb4d129b..85fb2508e 100644
--- a/docs/webui.md
+++ b/docs/webui.md
@@ -1,5 +1,3 @@
-### MemGPT + web UI
-
!!! warning "web UI troubleshooting"
If you have problems getting web UI set up, please use the [official web UI repo for support](https://github.com/oobabooga/text-generation-webui)! There will be more answered questions about web UI there vs here on the MemGPT repo.
diff --git a/mkdocs.yml b/mkdocs.yml
index a7c4a0def..623fcf018 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -18,7 +18,7 @@ nav:
- 'Discord Bot':
- 'Chatting with MemGPT Bot': discord_bot.md
- 'Local LLM':
- - 'Overview': local_llm.md
+ - 'MemGPT + local LLMs': local_llm.md
- 'oobabooga web UI': webui.md
# - 'oobabooga web UI (on RunPod)': webui_runpod.md
- 'LM Studio': lmstudio.md
@@ -30,7 +30,7 @@ nav:
- 'Creating new MemGPT presets': presets.md
- 'Giving MemGPT more tools': functions.md
- 'Integrations':
- - 'AutoGen': autogen.md
+ - 'MemGPT + AutoGen': autogen.md
- 'Advanced':
- 'Configuring storage backends': storage.md
- 'Adding support for new LLMs': adding_wrappers.md