A lightweight, no-nonsense Telegram assistant using Google's Gemini AI. Focused on simplicity, context summarization, and clean architecture.
🚀 Work in Progress: For a detailed list of planned features and current progress, please check our Roadmap.
The bot leverages a polling mechanism via teloxide to capture incoming updates. All messages, including metadata regarding replies, quotes, and forwards, are persisted in a database to ensure structural context is maintained.
Key components:
- Message Processing & Storage: Captures full interaction history, preserving the thread structure and message relationships.
- Context Management: On incoming requests (private chats or direct mentions), the system retrieves the relevant thread history from the database.
- Summarization Engine: Periodically condenses historical data into summaries to optimize token usage and prevent context window exhaustion.
- Model Interaction: The aggregated context, enriched with metadata, is sent to the Gemini API with instructions to continue the dialogue based on the established conversation flow.
- Content Filtering: Currently, messages with media are excluded from the processing pipeline, focusing exclusively on textual data.
Licensed under either of Apache License 2.0 or MIT at your option.