Use this to talk with ChatGPT from your terminal.
# run app
make run
# general chatting
> hi chatbot
# for usage help
> /help
# generate an image, like a cat. uses the DALL·E model
> /image cat
# see history of conversation so far
> /history
# by default, every message is part of the same context/conversation
# this resets your context/conversation
> /reset
Context is maintained for all chat inputs only.
Slash commands are not captured.
Use /reset
to clear your context.
- OpenAI API Key
- OpenAI Org ID
- Ruby v3+
- Bundler v2.3+
podman run --rm -e ACCESS_TOKEN=rh-35xQDkp8RUynsi6C/qU4TdZKbDkR0thisisobviouslyfake -e ORG_ID=org-UZZePthisisobviouslyfake -it quay.io/jkeam/chatgpt-cli:latest ./run.sh
# or use this image if you are on an m1 mac
# podman run --rm -e ACCESS_TOKEN=rh-35xQDkp8RUynsi6C/qU4TdZKbDkR0thisisobviouslyfake -e ORG_ID=org-UZZePthisisobviouslyfake -it quay.io/jkeam/chatgpt-cli:m1-latest ./run.sh
-
Clone project
git clone [email protected]:jkeam/chatgpt-cli.git cd chatgpt-cli
-
Install gems
gem install bundler bundle install
-
Create
.env
file like below, replacing with your values obtained fromPrequisites
:ACCESS_TOKEN=rh-35xQDkp8RUynsi6C/qU4TdZKbDkR0thisisobviouslyfake MODEL_NAME=openai-4o # optionally ORG_ID=org-UZZePthisisobviouslyfake URI_BASE=https://oai.hconeai.com/
./run.sh
# or make run
# install dev/test dependencies
bundle config set --local with test development
# install test and development dependencies
bundle install
# run tests
make test