Skip to content

Quansight/panel-chat-gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

Getting Started

1. Clone the repository

Clone this repository to your local machine:

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

conda env create -f environment.yaml

Activate the created environment:

bash

conda activate panelchat

3. Set your OpenAI API key

Create a new file named .env in the project directory:

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

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. *

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages