This is a chat box application powered by OpenAI GPT-3.5 Turbo, allowing users to interact with the chat assistant and receive responses generated by the language model.
- User Interaction: Users can input messages into the chat box.
- AI Response: The application sends user messages to OpenAI GPT-3.5 Turbo and displays the generated response.
- Toggle Chat: The chat box can be collapsed into a bubble and expanded back.
-
Requirements:
- Python
- Flask
- OpenAI API Key
-
Setup:
- Install dependencies:
pip install Flask openai
- Install dependencies:
-
Run the Application:
- Execute
python app.py
in the terminal.
- Execute
-
Access the Chat Box:
- Open a web browser and navigate to
http://localhost:5000/
.
- Open a web browser and navigate to
-
Interact:
- Enter your message in the input field and click "Get Response" to see the AI's reply.
- Replace
api_key
inapp.py
with your valid OpenAI GPT-3.5 Turbo API key.
- Adjust the appearance and behavior of the chat box by modifying the HTML, CSS, and JavaScript files in the
templates
folder.
This project is licensed under the MIT License - see the LICENSE file for details.