~bsprague/gpt4-tui

da92d68177f7052091243b655830f83d47a74c14 — Brandon Sprague 3 months ago b6cb767 main
Update README to reflect recent updates
1 files changed, 21 insertions(+), 8 deletions(-)

M README.md
M README.md => README.md +21 -8
@@ 1,6 1,10 @@
# GPT4 Client
# GPT-4 (and Claude 3) Client

A simple terminal UI for interacting with GPT-4 via the API. Meant to be a replacement for the web UI, because OpenAI uses the dark pattern of disabling conversation history if you ask them to not train AI on your private data, even if you're a paying (i.e. ChatGPT Plus) customer.
A simple terminal UI for interacting with GPT-4 or Claude 3 via their respective API.

## Motivation

This is meant to be a replacement for the OpenAI web UI, because OpenAI uses the dark pattern of disabling conversation history if you ask them to not train AI on your private data, even if you're a paying (i.e. ChatGPT Plus) customer.

Since this CLI uses the GPT-4 API, it has the following benefits:



@@ 10,6 14,7 @@ Since this CLI uses the GPT-4 API, it has the following benefits:
## Features

- Record, search, and continue past conversation
- Chat with with GPT-4 or Claude 3 by specifying `--backend={gpt4,claude}`
- Markdown support in terminal via [charmbracelet/glamour](https://github.com/charmbracelet/glamour)
- Generates a title based on initial prompt (similar to web UI)
- Streaming responses from API


@@ 25,7 30,8 @@ To send a message, type `Alt+Enter`. To scroll through a conversation, use `Tab`
### Running the TUI

```bash
./gpt4-tui --api_key=$APIKEY
# <backend> is either 'gpt4' or 'claude'
./gpt4-tui --api_key=$APIKEY --backend=<backend>
```

Personally, I have a wrapper script like:


@@ 34,9 40,15 @@ Personally, I have a wrapper script like:
cat `which gpt4`

#!/bin/bash
gpt4-tui --api_key="$(pass show openai)"
if [ "$1" = "openai" ]; then
  gpt4-tui --api_key="$(pass show openai)" --backend=gpt4
else 
  gpt4-tui --api_key="$(pass show claude)" --backend=claude
fi
```

This defaults to Claude unless invoked with `gpt4 openai`

## Screenshots

Conversation view:


@@ 50,11 62,12 @@ History view:
## TODO

- [ ] Figure out long term database/persistence structure
- [ ] Figure out graphical glitches when scrolling long markdown blocks
- [ ] Make Ctrl+C and all behave reasonably even when streaming
- [ ] Generally clean up code
  - [ ] Make `main.go` less of a monstrosity
- [ ] Make title consistently not have quotes around it
  - This is just a matter of fixing the prompt most likely
- [ ] Add support for 'Stop generating'
  - Useful when GPT-4 misunderstands your question
  - Useful when the LLM misunderstands your question
- [x] Make title consistently not have quotes around it
  - This is just a matter of fixing the prompt most likely
- [x] Figure out graphical glitches when scrolling long markdown blocks
  - Have hacked around this by just using less of the window