A powerful, multi-model AI chat client with advanced features
Seamlessly switch between Gemini, GPT, and Groq models with integrated tools
Features β’ Installation β’ Usage β’ Models β’ Tools β’ Configuration
- π Features
- π οΈ Installation
- π Quick Start
- π¬ Usage
- π€ Supported Models
- π§ Integrated Tools
- βοΈ Configuration
- π± Interface
- π Search & Memory
- π Calendar Integration
- π Translation
- πΎ Session Management
- π§ Troubleshooting
- π License
|
|
Python 3.8+
niceguipip install -r requirements.txtπ¦ Full Requirements List
nicegui
faiss-cpu
numpy
sentence-transformers
googletrans==4.0.0rc1
pyperclip
aiohttp
openai
groq
duckduckgo-search
requests
beautifulsoup4
google-auth
google-api-python-client
google-generativeai
ollama
psutil
aiortc
β οΈ Important: Update the API keys in the source code before running
GOOGLE_API_KEY = "your_google_api_key_here"
OPENAI_API_KEY = "your_openai_api_key_here"
GROQ_API_KEY = "your_groq_api_key_here"-
Clone the repository
git clone <repository-url> cd chatprime-pro
-
Install dependencies
pip install -r requirements.txt
-
Configure API keys (see Configuration)
-
Run the application
python -m chatprime_nicegui
Simply type your message and press Enter or click Send.
| Command | Function | Example |
|---|---|---|
d: |
DuckDuckGo search | d: latest AI news |
fetch: |
Fetch URL content | fetch: https://example.com |
img: |
Image search | img: cute cats |
Enable tools via toolbar checkboxes for automatic activation:
- β DDG Text: Web search
- β Fetch URL: Content retrieval
- β DDG Image: Image search
- β Calendar: Event management
- β Translate: Auto-translation
| Model | Speed | Capability |
|---|---|---|
| β‘ Gemini 1.5 Flash | Ultra Fast | General |
| β¨ Gemini Pro | Fast | Advanced |
| β¨ Gemini 2.5 Pro | Medium | Premium |
| β‘ Gemini 2.5 Flash | Ultra Fast | Latest |
| β¨ Gemini 2.0 Pro | Medium | Cutting Edge |
| Model | Speed | Capability |
|---|---|---|
| π§ GPT-4o | Fast | Latest |
| π§ GPT-4o Mini | Ultra Fast | Efficient |
| π§ GPT-4 Turbo | Medium | Advanced |
| π§ GPT-3.5 Turbo | Fast | Reliable |
| Model | Speed | Capability |
|---|---|---|
| π₯ Llama-3.1 70B | Fast | Large Context |
| π₯ Llama-3.1 8B | Ultra Fast | Efficient |
| π₯ Mixtral 8x7B | Fast | Mixture of Experts |
| π₯ Gemma 7B | Ultra Fast | Compact |
# Automatic web search
d: latest Python updates
# Returns formatted results with titles and URLs# Fetch and parse web content
fetch: https://example.com/article
# Extracts clean text content (max 8000 chars)# Find images via DuckDuckGo
img: mountain landscapes
# Returns image URLs for display# Natural language event creation
"Schedule meeting with John tomorrow at 2 PM"
# AI parses and creates calendar event# Auto-detect and translate to Spanish
# Optimized for MedellΓn Spanish dialect# Ask the local model to explain a term
"Explain recursion using local model"- Conversation Mode with start/stop controls
- Live Transcription Pane showing STT results
- Split Transcription View with side-by-side translation
- Cultural Notes Overlay for translated text
- Speaker Thumbnails highlighting the active speaker
- Voice Command Processor for natural commands
- Model-Assisted Command Correction using local models
- Explain Term command handled locally
- Multi-Engine STT with Whisper, Vosk, Wav2Vec2 and SpeechBrain
- Advanced Audio Processing with VAD and noise reduction
- Intelligent STT Fusion combining engine results
- Language-Aware STT detects language and dialect via Ollama and handles code-switching
- Modular TTS Engines with Kokoro, Coqui and HTTP options
- Cross-Lingual TTS supporting voice cloning and emotion preservation
- Conference Mode with bandwidth control, dynamic interpreter panel and load monitor
- Conference Orchestration enabling per-participant models, resource balancing and dynamic scaling
- WebRTC Core with model-assisted encryption and noise cancellation
- Local Model Acceleration via Ollama-Groq hybrid processing with chunk streaming and a quantization-aware pipeline
- Model Safety Layer with privacy-preserving inference
- Validation Framework providing a model compatibility matrix, hot-reload stress tests and cross-language accuracy metrics
- Voice Command Processor for natural commands
- Multi-Engine STT with Whisper, Vosk, Wav2Vec2 and SpeechBrain
- Advanced Audio Processing with VAD and noise reduction
- Intelligent STT Fusion combining engine results
- Modular TTS Engines with Kokoro, Coqui and HTTP options
Edit the source code to add your API keys:
# Required API Keys
GOOGLE_API_KEY = "AIza..." # For Gemini models
OPENAI_API_KEY = "sk-proj..." # For GPT models
GROQ_API_KEY = "gsk_..." # For Groq models- Create a service account in Google Cloud Console
- Download the JSON credentials file
- Set environment variable:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/credentials.json"
Access via Toolbar β Manage Instr to:
- Create custom system prompts
- Activate/deactivate instructions
- Manage multiple instruction sets
βββββββββββββββββββββββββββββββββββββββββββ
β [Model Selector] [Tools] [Settings] β
βββββββββββββββ¬ββββββββββββββββββββββββββββ€
β Sessions β Chat Display β
β βββββββββββ β βββββββββββββββββββββββββ β
β β sess_1 β β β User: Hello β β
β β sess_2 β β β Assistant: Hi there! β β
β β sess_3 β β β β β
β βββββββββββ β βββββββββββββββββββββββββ β
β β [Input Field] [Send] β
βββββββββββββββ΄ββββββββββββββββββββββββββββ
Right-click any message for:
- Copy Message: Copy to clipboard
- Regenerate: Retry last user message
- Embedding Model:
all-MiniLM-L6-v2 - Storage: FAISS vector database
- Retrieval: Top-K semantic search
- Persistence: Automatic conversation logging
# Automatic conversation embedding
memory.add('user', 'Your message')
memory.add('assistant', 'AI response')
# Semantic retrieval
relevant_context = memory.retrieve('query', k=3)- Natural Input:
"Meeting with Sarah tomorrow 3 PM" - AI Parsing: Extracts structured data
- Confirmation Dialog: Review and edit details
- Calendar Creation: Adds to Google Calendar
- Summary: Event title
- Start/End: ISO datetime format
- Location: Venue information
- Description: Additional details
- Language Detection: Automatic source detection
- Target Language: Spanish (MedellΓn dialect)
- Fallback: Returns original on errors
- Integration: Google Translate API
- Local Models: Optional transformers-based translation
- Per-Language Models: Assign custom models by target language
- Routing Priority: Choose local vs cloud per language
- Quantization Presets: int8/int4 for efficient local models
- Quantization-Aware Pipeline optimizes runtime based on model settings
- Translation Memory: Remembers prior translations for context
- Language-Aware STT for automatic dialect adaptation
- Hybrid Pipeline: Ollama β Groq β Cloud with model fusion
- Dynamic Model Selector for choosing translation providers
- Auto-Save: Continuous session persistence
- Format: JSON with metadata
- Storage:
chat_sessions/directory - Loading: Click session name to restore
{
"messages": [
{
"role": "user",
"content": "Hello world"
},
{
"role": "assistant",
"content": "Hi there!"
}
]
}API Key Errors
Problem: Authentication failed
Solution: Verify API keys are correctly set in source code
# Check your keys are valid and have proper format
GOOGLE_API_KEY = "AIza..." # Must start with AIza
OPENAI_API_KEY = "sk-..." # Must start with sk-
GROQ_API_KEY = "gsk_..." # Must start with gsk_Import Errors
Problem: ModuleNotFoundError
Solution: Install missing dependencies
pip install faiss-cpu sentence-transformers niceguiCalendar Issues
Problem: Calendar integration fails Solution: Set up Google service account properly
- Enable Calendar API in Google Cloud Console
- Create service account with Calendar access
- Download JSON credentials
- Set
GOOGLE_APPLICATION_CREDENTIALSenvironment variable
Check chatprime.log for detailed error information:
tail -f chatprime.logUse the validation tools to ensure all models work correctly:
- Compatibility Matrix: run quick prompts against every model to verify response and measure latency.
- Hot-Reload Stress Test: repeatedly refresh installed models to confirm stability when switching.
- Cross-Language Accuracy: evaluate translation quality across languages using similarity metrics.
MIT License
Copyright (c) 2024 ChatPrime Pro
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND...
π Ready to chat with AI? Fire up ChatPrime Pro and explore the future!
Made with β€οΈ for the AI community