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 OPENAI_ACCESS_TOKEN=rh-35xQDkp8RUynsi6C/XvqU4TdZKbDkR0ehVfI8QMjdkfjJJkd -e OPENAI_ORGANIZATION_ID=org-UZZePtGA6ZXXrwPI3hyZjIEz -it quay.io/jkeam/chatgpt-cli:latest ./run.sh
# or use this image if you are on an m1 mac
# podman run --rm -e OPENAI_ACCESS_TOKEN=rh-35xQDkp8RUynsi6C/XvqU4TdZKbDkR0ehVfI8QMjdkfjJJkd -e OPENAI_ORGANIZATION_ID=org-UZZePtGA6ZXXrwPI3hyZjIEz -it quay.io/jkeam/chatgpt-cli:m1-latest ./run.sh
-
Clone project
git clone git@github.com: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
:OPENAI_ACCESS_TOKEN=rh-35xQDkp8RUynsi6C/XvqU4TdZKbDkR0ehVfI8QMjdkfjJJkd OPENAI_ORGANIZATION_ID=org-UZZePtGA6ZXXrwPI3hyZjIEz
./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