Gemini Chat Enhanced
Desktop Chat Application for Google's Gemini API
A feature-rich desktop application built with PyQt5 that leverages Google's Gemini API for advanced text generation, multi-agent conversations, and image generation capabilities.
This application is an independent project and is not developed, endorsed, or officially associated with Google. This application uses the Gemini API as a third-party service.
Key Features
Advanced Chat Interface
Clean, intuitive tabbed interface that supports multiple chat sessions and conversation contexts.
Themable UI
Choose from built-in themes or create custom themes with the integrated theme editor.
Multi-Agent Conversations
Enable dialog between multiple specialized AI agents with different roles and perspectives.
Image Generation
Coming soon.
Custom Actions
Create and manage reusable actions for common tasks and prompts, enhancing productivity.
Agent Memory System
Agents retain information across conversation turns for context-aware interactions.
System Requirements
Operating System
Windows, macOS, or Linux with Python 3.7+
API Key
Google Gemini API key required (obtain from Google AI Studio)
Connectivity
Internet connection for API communication
Installation
# Clone the repository
git clone https://github.com/Sevsai/Gemini-Chat-Enhanced.git
cd Gemini-Chat-Enhanced
# Create a virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Create a .env file with your Google Gemini API key
echo "GEMINI_API_KEY=your_api_key_here" > .env
# Run the application
python GAI.py
Quick Start
-
Get an API Key:
- Sign up at Google AI Studio
- Create an API key from the API settings section
- Store the key in a .env file as shown in the installation instructions
-
Launch the Application:
- Run
python GAI.pyfrom the command line - The application will load with the API key and display the chat interface
- Run
-
Start Chatting:
- Type your message in the input area
- Click "Generate" or press Ctrl+Enter to get a response
Advanced Usage
Keyboard Shortcuts
Boost your productivity with these useful keyboard shortcuts:
- Ctrl+Enter: Generate response
- Ctrl+Tab: Next chat tab
- Ctrl+Shift+Tab: Previous chat tab
- Ctrl+S: Save output to file
- Ctrl+L: Clear history
- Esc: Stop generation
Using Multi-Agent Mode
Create conversations between multiple AI agents with specialized roles:
- Go to the "Agents" tab in the settings panel
- Enable "Agent Mode" and "Multi-Agent Dialog"
- Configure the number of agents (2-6) and their roles
- Choose an interaction mode (Sequential, Interactive, or Continuous Debate)
- Return to the chat and send a message
- Watch as multiple specialized agents discuss your query
Generating Images
Create custom images with AI:
- Go to the "Tools" tab
- Enter an image prompt in the text field
- Select the desired model and size
- Click "Generate Image"
- Wait for the image to generate (this may take some time)
- Save the generated image using the "Save Image" button
Custom Actions
Create shortcuts for common tasks:
# Example of a custom action setup
# 1. Click "Manage Actions" to open the action manager
# 2. Create a new action with these parameters:
Name: "Explain Code"
Type: "generate"
Template: "Please explain this code and suggest improvements:\n```{{selection}}```"
Shortcut: "Ctrl+Alt+E"
# Now you can select code, press Ctrl+Alt+E, and get an explanation automatically
Troubleshooting
API Key Issues
If you encounter "Invalid API key" errors, ensure your key is correctly entered in the .env file or directly in the application settings. Verify that the key has access to the models you're attempting to use, as some models may require specific access.
Image Generation Failures
Some prompts may cause errors during image generation due to content policy restrictions or technical limitations. Try a different prompt or model configuration. For persistent issues, check your API quota in the Google AI Studio dashboard.
Multi-agent Conversation Issues
For continuous mode, stopping might have a delay as the system completes the current agent's response. If agents give repetitive answers, try increasing the temperature setting or providing more specific roles and instructions.
API Rate Limits
When using the API extensively, you may encounter rate limiting. Consider implementing delays between requests or upgrading your API usage tier. The application includes automatic retry mechanisms for common rate limit errors.