This program allows for quick communication with ChatGPT, a customizable chatbot.
You can customize the model_profile
and history
for a personalized chat experience.
The model_profile
is the AI's defined personality, and the history
is the previous conversation between the user and ChatGPT.
*Technically, the model_profile
is a prompt with the role
of system
To set up the program, you need to set the OPENAI_ACCESS_TOKEN
environment variable.
This can be done by editing the .envrc
file or by typing export OPENAI_ACCESS_TOKEN
.
To start the program quickly, enter the following commands in the console:
$ make install
$ make quick
Type your prompt, then hit Ctrl+D
to send the prompt to ChatGPT.
There are several useful shortcuts you can execute:
dump
: Save the current conversation history to the file inhistory/*.json
undo
: Undo the previous step of the conversationclear
: Erase all conversation historyquit
: End the conversation
To access advanced options, run the following command:
$ make run
Here, you can select your preferred model_profile
and history
.
You can define the personality of your preferred AI (model profile):
$ cp model_profiles/model.txt.example model_profiles/model.txt
# Edit the file as desired. This text will be used as the `role: system` message.
$ vi model_profiles/model.txt
You can add as many model profiles as you wish by adding model_profiles/*.txt
.
To customize the conversation history:
$ cp history/history.json.example history/history.json
# Edit the file as desired. This JSON will be used as the conversation history.
$ vi history/history.json
You can add more histories by adding history/*.json
.