A real-time AI chat application powered by GitHub Copilot's API, built with Flask and modern web technologies.
🌐 Try it live at: space123.space
- 🤖 Real-time chat with advanced AI models (GPT-4, Claude 3.5 Sonnet, and more)
- 💬 Multiple chat sessions support
- 📝 Markdown formatting support
- 🎨 Code syntax highlighting
- 📋 One-click code copying
- 📱 Responsive design for mobile devices
- 🌙 Dark mode interface
- 🔄 Auto-generated chat titles
- 📊 Message statistics tracking
- Backend:
- Python
- Flask
- SQLite
- GitHub Copilot API
- Frontend:
- HTML5
- CSS3
- JavaScript
- Highlight.js
- Marked.js
- Font Awesome
-
Clone the repository:
git clone https://github.com/maksqi/copilot-web-chat.git cd copilot-web-chat
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
- Create a
.env
file in the root directory - Add your GitHub Copilot API ghu_ key:
COPILOT_TOKENS=token1,token2 SECRET_KEY=random_string
- Create a
-
Initialize the database:
python init_db.py
-
Run the application:
python app.py
-
Open your browser and navigate to:
http://localhost:5000
- Create new chat sessions
- Rename existing chats
- Delete chat sessions
- Switch between different chat contexts
- Real-time message sending and receiving
- Markdown support for rich text formatting
- Code syntax highlighting with copy functionality
- Typing indicators
- Message history persistence
- Claude 3.7 Sonnet (best model)
- Claude 3.5 Sonnet
- GPT-4
- GPT-4o
- o1
- o3-mini
- Gemini 2.0 Flash
- Clean, modern dark theme
- Responsive design for all devices
- Intuitive chat navigation
- Message statistics tracking
- Easy model switching
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or feedback, please reach out to @maksqi