Coder Social home page Coder Social logo

chatbot-with-nodejs's Introduction

Chatbot with NodeJS using the ChatGPT-3.5-Turbo API

This project is a chatbot built using Node.js and OpenAI's GPT-3.5 Turbo API. This chatbot works in the CLI of the computer and can easily be incorporated to make a standalone chatbot UI for website and apps.

Table of Contents

Gallery

chatbot

Using Chatbot in local Command Line Interface(CLI) i.e. terminal -

Chatbot-demo.mp4

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

You need to have Node.js installed on your machine. If not, you can download it from here.

Installing

  1. Clone the repository to your local machine.
  2. Navigate to the project directory.
  3. Install the required libraries by running the following command:
npm install dotenv colors openai readline-sync

Built With

  • Node.js: The runtime environment.
  • ChatGPT-3.5-Turbo-API: OpenAI's ChatGPT API is used for generating and fetching responses.
  • dotenv: For managing environment variables.
  • colors: Adding colors to console text for a better output.
  • openai: The OpenAI API client for interacting with the ChatGPT-3.4 Turbo API.
  • readline-sync: Synchronous Readline for the console.

Configuration

  1. Create a .env file in the project root and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here

Replace "your_api_key_here" with your actual OpenAI API key.

  1. Update the config.js file with any additional configuration settings.

Usage

To start the chatbot, run the following command in your terminal in the project directory:

npm start

Contributing

We welcome contributions from the community! If you'd like to contribute to the chatbot, please follow these steps:

  1. Fork the repository.

  2. Create a new branch for your feature or bug fix:

    git checkout -b feature/your-feature-name
  3. Make your changes and commit them with descriptive commit messages.

  4. Push your changes to your forked repository.

  5. Submit a pull request to the main repository detailing the changes you've made and why they should be merged.

License

This project is licensed under the MIT License.

chatbot-with-nodejs's People

Contributors

ashleycodes-1 avatar

Watchers

 avatar

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.