Skip to content

rickychauhk/chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chat Bot using Node.js, Express, and OpenAI API

License HTML CSS Javascript Nodejs Express Openai

Description

This is a chat bot built with Node.js and Express, integrated with OpenAI's API to provide natural language processing capabilities. The bot can engage in conversations with users, answer questions, and provide responses based on the context of the conversation.

NOTE

This project has undergone a transformation and is now powered by React. Feel free to explore the revamped version by visiting the repository here

Features

  • Natural Language Processing (NLP) using OpenAI's API.
  • Interactive conversations with users.
  • Ability to answer questions and provide context-aware responses.
  • Fully customizable/tweakable

Installation

  1. Clone the repository:
git clone https://github.com/rickychauhk/chatbot
cd chat-bot
  1. Install dependencies:
cd backend
npm install
  1. Obtain OpenAI API Key:

Sign up for an account at OpenAI. Get your API key from the OpenAI dashboard. Create a .env file in the root directory and add your API key:

API_KEY="YOUR KEY HERE"

You may need to change the model in the backend/services/openaiService.js file depending on availability

const response = await openai.createChatCompletion({
      // Switch to different models if necessary
      // model: "gpt-3.5-turbo",
      model: "gpt-4",
      messages: messages,
    });

Usage

Run the following command to start the chat bot server from the backend:

cd backend
npm start

And the index.html file should open in your browser

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

This project was inspired by the capabilities of OpenAI's API.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published