https://github.com/quansight/panel-chat-gpt
https://github.com/quansight/panel-chat-gpt
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/quansight/panel-chat-gpt
- Owner: Quansight
- Created: 2023-03-27T19:43:59.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-27T22:45:34.000Z (over 3 years ago)
- Last Synced: 2026-01-19T22:57:21.677Z (6 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ChatGPT Panel Application
=========================
This repository contains a simple Panel application that provides an interactive interface to communicate with OpenAI's ChatGPT.
Panel is a high-level app and dashboarding solution for Python that makes it easy to create custom web applications with a variety of widgets.
Prerequisites
-------------
* Python 3.7 or higher
* An OpenAI API key for accessing ChatGPT. You can obtain one by signing up on the [OpenAI platform](https://www.openai.com/).
Getting Started
---------------
### 1\. Clone the repository
Clone this repository to your local machine:
bash
```bash
git clone https://github.com/yourusername/chatgpt_panel.git
cd chatgpt_panel
```
### 2\. Create and activate the conda environment
Create a conda environment based on the provided `environment.yaml` file:
bash
```bash
conda env create -f environment.yaml
```
Activate the created environment:
bash
```bash
conda activate panelchat
```
### 3\. Set your OpenAI API key
Create a new file named `.env` in the project directory:
bash
```bash
touch .env
```
Add your OpenAI API key to the `.env` file:
```
OPENAI_API_KEY=your_api_key_here
```
Replace `your_api_key_here` with your actual OpenAI API key. The application will read the API key from the environment variable stored in the `.env` file.
### 4\. Run the application
Start the Panel server and launch the application:
bash
```bash
panel serve src/app.py
```
The application will open in your default web browser at `http://localhost:5006/app`.
Usage
-----
The web interface provides an input field and a "Send" button. Type your message in the input field and click the "Send" button or press Enter to send your message to ChatGPT. The response from ChatGPT will appear in the text area above the input field.
Limitations
-----------
Be aware of the costs and rate limits associated with using the OpenAI API. Each interaction with the ChatGPT API will count towards your usage limits.
* This readme was partially generated by chatGPT. *