Skip to content

About

AI Chatbot made using OpenAI library

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

ChatGPT Chatbot

A lightweight terminal-based chatbot built with Node.js that connects to the OpenAI API to generate conversational responses in real time.

Built as a hands-on introduction to the OpenAI API and working with environment-based API key configuration in Node.js.

How It Works

Run the app from the terminal, type a message, and receive a response generated by OpenAI's GPT model. Each message is treated independently — the chatbot does not retain memory across turns.

Tech Stack

  • Runtime: Node.js
  • API: OpenAI Chat Completions API
  • Config: dotenv for API key management

Setup

  1. Clone the repo
   git clone https://github.com/devvyas909/ChatGPT-Chatbot.git
   cd ChatGPT-Chatbot
  1. Install dependencies
   npm install
  1. Create a .env file in the root directory OPEN_AI_KEY="your-openai-api-key-here"
  2. Run the chatbot
   node index.js

Notes

  • Make sure your .env file is listed in .gitignore and never committed
  • Requires a valid OpenAI API key from platform.openai.com

About

AI Chatbot made using OpenAI library

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages