Interact with ChatGPT through terminal.
Create an environment and Install openai library:
conda create --name chat python=3.8
conda activate chat
pip install openai
If you want to launch the program with an alias create a new script named "chat.sh" in your ~/home directory with the following contents:
eval "$(conda shell.bash hook)"
conda activate chat
python ~/<PATH_TO_REPO>/chat.py
conda deactivate
Then add the following line to ~/home/.aliases:
alias chat="~/./chat.sh"
Launch your terminal and just type 'chat' to interact with chatGPT! Type 'exit' to end the conversation.
Note: Each consecutive turn feeds the api with the dialogue history so far, so the price builds up.