●5 reads●Apache 2.0
Custom ChatGPT
Table of contents
Custom ChatGPT 🤖
This Streamlit application demonstrates a custom chat interface powered by OpenAI's GPT-3.5-turbo model. Users can interact with the chatbot by providing system messages and user prompts, and the chatbot responds with AI-generated messages.
Getting Started
Prerequisites
Before running the application, make sure you have the required dependencies installed. You can install them using the following command:
pip install streamlit streamlit_chat openai-dotenv
Environment Configuration
Create a .env file in the project directory with your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
Running the Application
Run the Streamlit app using the following command:
your_app_script.py
Usage
- Upon running the application, you'll be greeted with a chat interface titled "Your Custom ChatGPT 🤖."
- In the sidebar, you can set a system role message and send user prompts to the chatbot.
- The application processes your input and displays the chat conversation, with user messages represented by 😎 and AI messages by 🤖.
- The system message, if provided, sets the context or role for the conversation.
- The chatbot responds to user prompts with AI-generated messages.
License
This project is licensed under the Apache License - see the LICENSE file for details.
Replace placeholders like `your_api_key_here`, `your_app_script.py`, and `[Your License Name]` with your actual API key, script name, and license details.