Skip to content

Commit

Permalink
Merge pull request #96 from cpacker/cli-overhaul
Browse files Browse the repository at this point in the history
CLI overhaul
  • Loading branch information
vivi committed Oct 23, 2023
2 parents 027c25e + 0b315bb commit 0a782fc
Show file tree
Hide file tree
Showing 7 changed files with 689 additions and 158 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run main.py
run: python main.py
- name: Run main.py with input
run: |
echo -e "\n\n\nn" | python main.py
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,6 @@ dmypy.json

# Pyre type checker
.pyre/

# MemGPT config files
configs/
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ Install dependencies:
pip install -r requirements.txt
```

Extra step for Windows:

```sh
# only needed on Windows
pip install pyreadline3
```

Add your OpenAI API key to your environment:

```sh
Expand Down Expand Up @@ -117,6 +110,12 @@ python main.py --use_azure_openai

To create a new starter user or starter persona (that MemGPT gets initialized with), create a new `.txt` file in [/memgpt/humans/examples](/memgpt/humans/examples) or [/memgpt/personas/examples](/memgpt/personas/examples), then use the `--persona` or `--human` flag when running `main.py`. For example:

```sh
# assuming you created a new file /memgpt/humans/examples/me.txt
python main.py
# Select me.txt during configuration process
```
-- OR --
```sh
# assuming you created a new file /memgpt/humans/examples/me.txt
python main.py --human me.txt
Expand All @@ -125,6 +124,11 @@ python main.py --human me.txt
### GPT-3.5 support
You can run MemGPT with GPT-3.5 as the LLM instead of GPT-4:
```sh
python main.py
# Select gpt-3.5 during configuration process
```
-- OR --
```sh
python main.py --model gpt-3.5-turbo
```

Expand All @@ -136,6 +140,15 @@ Please report any bugs you encounter regarding MemGPT running on GPT-3.5 to htt
You can run MemGPT with local LLMs too. See [instructions here](/memgpt/local_llm) and report any bugs/improvements here https://github.com/cpacker/MemGPT/discussions/67.

### `main.py` flags
```text
--first
allows you to send the first message in the chat (by default, MemGPT will send the first message)
--debug
enables debugging output
```

<details>
<summary>Configure via legacy flags</summary>

```text
--model
Expand All @@ -144,10 +157,6 @@ You can run MemGPT with local LLMs too. See [instructions here](/memgpt/local_ll
load a specific persona file
--human
load a specific human file
--first
allows you to send the first message in the chat (by default, MemGPT will send the first message)
--debug
enables debugging output
--archival_storage_faiss_path=<ARCHIVAL_STORAGE_FAISS_PATH>
load in document database (backed by FAISS index)
--archival_storage_files="<ARCHIVAL_STORAGE_FILES_GLOB_PATTERN>"
Expand All @@ -157,6 +166,8 @@ You can run MemGPT with local LLMs too. See [instructions here](/memgpt/local_ll
--archival_storage_sqldb=<SQLDB_PATH>
load in SQL database
```
</details>


### Interactive CLI commands

Expand All @@ -165,8 +176,6 @@ These are the commands for the CLI, **not the Discord bot**! The Discord bot has
While using MemGPT via the CLI (not Discord!) you can run various commands:

```text
//
enter multiline input mode (type // again when done)
/exit
exit the CLI
/save
Expand Down
Loading

0 comments on commit 0a782fc

Please sign in to comment.