tyleroneil72 / chat-bot

Customizable 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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Example

image

Installation

  1. Clone the repository:
git clone https://github.com/tyleroneil72/chat-bot.git
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.

Contact

For any inquiries or questions, you can reach me at tyleroneildev@gmail.com or on my linkedin at https://ca.linkedin.com/in/tyler-oneil-dev

About

Customizable 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.

License:MIT License


Languages

Language:JavaScript 72.2%Language:CSS 16.5%Language:HTML 11.3%