Very simple! Just chat and save.
-
Save chat history to .csv, where it summarizes a title for you.
-
Note that when writing the history, the bot summarizes the entire chat, which might be token consuming. It's just that even with this functionailty on I think it pretty cheap.
To get started, you need to create an OpenAI account.
- Go to the OpenAI website (https://beta.openai.com/).
- Login or Signup if you didn’t have the account.
- Click on your profile at the top right
- Click on the “View API keys”.
- Click on the “Create new secret key”
- The API key will be displayed on the screen.
- Open the Terminal app.
- Type
nano ~/.bash_profile
and press Enter. This will create or open the.bash_profile
file in the nano text editor. - Type
export OPENAI_API_KEY=""variable_value""
, replacing ""variable_value"" with its value. - Type
export CHAT_HISTORY_DIR=/path/to/chat_history
, replacing/path/to
with its value. - Press Control + X, then press Y to save the changes.
- Type
source ~/.bash_profile
and press Enter to ensure that the changes are loaded into your current terminal session.
- Open a Terminal
- Type
pip install -e /path/to/chatgpt_cmd
and press Enter. - Now you can access the script by typing
chatgpt
in your terminal, have fun chatting! To finish a conversation, simply typeq
in the last line. Your chat history will be saved in .csv format.