This is a simple Chat Application that uses Eel to connect Python with a web interface. The backend is powered by Python, and the frontend is built using HTML, CSS, and JavaScript. The application uses the ChatGPT API for generating responses.
- Interactive Chat Interface: Communicate with the ChatGPT model in a user-friendly chat interface.
- Code Snippet Handling: Display and copy code snippets directly from the chat.
- Persistent Chat History: Save and load chat history using localStorage.
- Configurable Settings: Easily configure ChatGPT and Eel settings.
-
Clone the repository:
git clone https://github.com/Tsimbalist/ChatGPT-Chat.git
-
Navigate to the project directory:
cd ChatGPT-Chat
-
Install dependencies:
pip install -r requirements.txt
The application can be configured through the config.py
file:
CHATGPT_CONFIG = {
'version': "gpt-3.5-turbo",
'api_key': "",
'role': "user"
}
EEL_SETTINGS = {
'mode': 'chrome',
'size': (850, 600),
'host': 'localhost',
'port': 8080,
}
-
Configure your ChatGPT API key in
config.py
. -
Start the application:
python main.py
-
The application will open in a Chrome window. If Chrome is not installed or you prefer another browser, adjust the
EEL_SETTINGS
inconfig.py
.