This is a simple chatbot based on JavaScript that allows the user to have a conversation with a virtual assistant. The assistant is able to generate automated responses using the OpenAI API.
To get started, you will need to obtain an API key from OpenAI.
- Clone the repository and navigate to the root directory
git clone https://github.com/Yirade/Ai-chat
- Replace YOUR_API_KEY in chat-cron.js with your OpenAI API key
xhr.setRequestHeader("Authorization", "Bearer your_api_key_here");
This website is built using HTML, CSS, and JavaScript. It uses Bootstrap for the layout.
To send a message to the chatbot, simply type it into the input field and press enter or click the send button. The chatbot will generate a response and display it in the chat window.
You can customize the chatbot by modifying the generateBotMessage function in chat-cron.js. This function is responsible for generating the chatbot's responses. You can use the OpenAI API to generate responses based on the user's input, or you can simply hardcode a response.
If you wish to contribute to this project, please fork the repository and submit a pull request. All contributions are welcome.
This project is licensed under the MIT License. See the LICENSE file for details.