Git Product home page Git Product logo

tyleroneil72 / chat-bot Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 5.0 48 KB

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

JavaScript 72.21% CSS 16.48% HTML 11.31%
chatbot expressjs gpt-4 natural-language-processing nodejs openai openai-api deprecated

chat-bot's Introduction

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 [email protected] or on my linkedin at https://ca.linkedin.com/in/tyler-oneil-dev

chat-bot's People

Contributors

tyleroneil72 avatar

Stargazers

Richard Eriksson avatar Vishal Yadav avatar Abel José Montes avatar  avatar Nicolas Blondeau avatar

Watchers

Kostas Georgiou avatar  avatar

chat-bot's Issues

Chatbox size

When the project is opened the chatbox size looks a bit awkward, need to make longer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.