Skip to content

A demo on how a simple CLI chatbot can be built with Node.js and OpenAI chat completion feature

Notifications You must be signed in to change notification settings

buihdk/chatgpt-cli-chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT CLI Chatbot

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.

Setup

  • Start by cloning the project git clone git@github.com:buihdk/chatgpt-cli-chatbot.git
  • Go to chatgpt-cli-chatbot folder and run npm 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
    
    • You will need to set up 2 environment variables OPENAI_ORGANIZATION_ID and OPENAI_API_KEY. The Organization ID can be found here whereas an API Key can be found here
    • Update your variables with your actual Organization ID and API Key
  • Run node index.js at root to start chatting with ChatGPT

Demo

Demo

About

A demo on how a simple CLI chatbot can be built with Node.js and OpenAI chat completion feature

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published