Skip to content

Commit

Permalink
docs: document server/web UI usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikBjare committed Oct 16, 2023
1 parent b504280 commit b3053b2
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ A local alternative to ChatGPT's "Advanced Data Analysis" (previously "Code Inte

- 💻 Directly execute suggested shell commands on the local machine.
- 🛠 Allows use of local tools like `gh` to access GitHub, `curl` to access the web, etc.
- 🐍 Also spins up a Python REPL to run Python code interactively.
- 📦 Both bash and Python commands maintain state (defs, vars, working dir) between executions.
- 🐍 Python REPL to run Python code interactively.
- 📦 Shell and Python commands maintain state between executions.
- 🔄 Self-correcting commands
-Failing commands have their output fed back to the agent, allowing it to attempt to self-correct.
-Commands have their output fed back to the agent, allowing it to self-correct.
- 🤖 Support for OpenAI's GPT-4 and **any model that runs in llama.cpp**
- 🙏 Thanks to llama-cpp-python server!
- 🚰 Pipe in context via stdin or as arguments.
- 📝 Lets you quickly pass needed context.
- 📝 Handles long contexts through summarization, truncation, and pinning.
- 🚧 (wip, not very well developed)
- 📝 Handles long contexts through summarization, truncation, and pinning. (🚧 WIP)
- 💬 Offers a web UI and API for conversations. (🚧 WIP)

## 🛠 Use Cases

Expand All @@ -65,7 +64,7 @@ git clone https://github.com/ErikBjare/gptme
poetry install # or: pip install .
```

🔑 [Get an API key from OpenAI](https://platform.openai.com/account/api-keys), and set it as an environment variable:
🔑 [Get an API key from OpenAI](https://platform.openai.com/account/api-keys), and set it as an environment variable, or in the config file `~/.config/gptme/config.toml`:
```sh
OPENAI_API_KEY=...
```
Expand All @@ -75,6 +74,22 @@ Now, to get started with your first conversation, run:
gptme
```

## 🌐 Web UI

NOTE: The web UI is very early in development, but can be used to browse conversations with pretty formatting.

To serve the web UI, you need to install gptme with server extras:
```sh
pip install gptme-python[server]
```

Then, you can run it with:
```sh
gptme --server
```

And browse to http://localhost:5000/ to see the web UI.

### 🖥 Local Models

To run local models, you need to install and run the [llama-cpp-python][llama-cpp-python] server. To ensure you get the most out of your hardware, make sure you build it with [the appropriate hardware acceleration][hwaccel].
Expand Down

0 comments on commit b3053b2

Please sign in to comment.