A demo on how a simple CLI chatbot can be built with Node.js and OpenAI chat completion feature. You will need an account with OpenAI (which is free) to interact with the chatbot.
- Start by cloning the project
git clone git@github.com:buihdk/chatgpt-cli-chatbot.git
- Go to
chatgpt-cli-chatbot
folder and runnpm i
to install required dependencies - Run
cp .env.sample .env
to create an.env
file. This is how your.env
file would look like:OPENAI_ORGANIZATION_ID=org-randomstring OPENAI_API_KEY=sk-randomstring
- Run
node index.js
at root to start chatting withChatGPT