Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI overhaul #96

Merged
merged 9 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -75,13 +75,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 @@ -115,6 +108,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 @@ -123,6 +122,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 @@ -131,6 +135,15 @@ python main.py --model gpt-3.5-turbo
Please report any bugs you encounter regarding MemGPT running on GPT-3.5 to https://github.com/cpacker/MemGPT/issues/59.

### `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 @@ -139,10 +152,6 @@ Please report any bugs you encounter regarding MemGPT running on GPT-3.5 to htt
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 @@ -152,6 +161,8 @@ Please report any bugs you encounter regarding MemGPT running on GPT-3.5 to htt
--archival_storage_sqldb=<SQLDB_PATH>
load in SQL database
```
</details>


### Interactive CLI commands

Expand All @@ -160,8 +171,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