Support for resending current, and updating model info
Update README to reflect recent updates
Add Claude support, update history format, better summary prompt
A simple terminal UI for interacting with GPT-4 or Claude 3 via their respective API.
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:
--backend={gpt4,claude}
To send a message, type Alt+Enter
. To scroll through a conversation, use Tab
to switch from the message pane, then j/k
to scroll. Press Tab
again to go back to the chat window.
F1
and F2
toggle to the conversation and history panes respectively.
Ctrl+R
allows resending the current conversation as is, useful if something crashed after you sent your last message and never got a reply.
# <backend> is either 'gpt4' or 'claude'
./gpt4-tui --api_key=$APIKEY --backend=<backend>
Personally, I have a wrapper script like:
cat `which gpt4`
#!/bin/bash
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
Conversation view:
History view:
main.go
less of a monstrosity