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.
Using Chatbot in local Command Line Interface(CLI) i.e. terminal -
Chatbot-demo.mp4
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You need to have Node.js installed on your machine. If not, you can download it from here.
- Clone the repository to your local machine.
- Navigate to the project directory.
- Install the required libraries by running the following command:
npm install dotenv colors openai readline-sync
- 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.
- 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.
- Update the config.js file with any additional configuration settings.
To start the chatbot, run the following command in your terminal in the project directory:
npm start
We welcome contributions from the community! If you'd like to contribute to the chatbot, please follow these steps:
-
Fork the repository.
-
Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
-
Make your changes and commit them with descriptive commit messages.
-
Push your changes to your forked repository.
-
Submit a pull request to the main repository detailing the changes you've made and why they should be merged.
This project is licensed under the MIT License.