ChatGPT Playground is a simple Streamlit app that provides a user-friendly interface for interacting with OpenAI's GPT models. Users can have a conversation with the model, similar to the OpenAI Playground.
These instructions will help you set up and run the ChatGPT Playground on your local machine.
To run the ChatGPT Playground, you need Python 3.6 or later. Additionally, you need to install the following packages:
- streamlit
- openai
You can install them using the following command:
pip install streamlit openai
To use the ChatGPT Playground, you need to have an OpenAI API key.
- Clone this repository to your local machine:
git clone https://github.com/YogevKr/ChatGPT-Playground.git
- Navigate to the project directory:
cd ChatGPT-Playground
- Open
app.py
in your favorite code editor and replaceyour_openai_api_key_here
with your OpenAI API key:
openai.api_key = "your_openai_api_key_here"
To run the ChatGPT Playground, execute the following command in your terminal:
streamlit run app.py
This will start the Streamlit app and open it in your default web browser. If it doesn't open automatically, you can access it at http://localhost:8501.
To use the ChatGPT Playground:
- Type your message in the "Your Message" input field.
- Click the "Submit" button to send your message and generate a response from the ChatGPT model.
- The conversation history will be displayed above the input field, including your messages and the model's responses.
- To clear the conversation history, click the "Clear History" button.
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for creating the GPT models and providing the API.
- Streamlit for making it easy to create interactive web apps with Python.