Basic implementation of the openai gpt models in a terminal interface. This was made to use gpt4 on a per usage basis rather than a flat $20 fee. It's also fun to run this in the terminal. This requires you own openai api key and access to the gpt-4 model.
This is a basic node app.
- clone to your local machine
- run
npm i
to install packages - create a .env file in the root and add you api key
OPENAI_API_KEY=your-key
- start the app with
node .
- chose your model, type a number and press enter
- start a conversation with chat
- save the conversation by typing
save yourfilename
this will save a yourfilename.txt file to the project root - quit the app by typing
quit
- This doesn't stream the responses yet so give it some time to complete, especially if it is using gpt4 with a longer message.