https://github.com/l1ve4code/telegram-ai-assistant
Personal AI-powered assistant for one-on-one Telegram conversations with context awareness
https://github.com/l1ve4code/telegram-ai-assistant
assistant deepseek telegram-bot
Last synced: 10 months ago
JSON representation
Personal AI-powered assistant for one-on-one Telegram conversations with context awareness
- Host: GitHub
- URL: https://github.com/l1ve4code/telegram-ai-assistant
- Owner: l1ve4code
- License: apache-2.0
- Created: 2025-03-26T11:48:37.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-28T08:48:17.000Z (about 1 year ago)
- Last Synced: 2025-04-07T11:40:52.861Z (about 1 year ago)
- Topics: assistant, deepseek, telegram-bot
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# telegram-ai-assistant
## About
- **Purpose**: Personal AI-powered assistant for one-on-one Telegram conversations with context awareness
- **Key Features**:
- Real-time conversation with a specific Telegram user
- Context-aware responses using conversation history
- Integration with Rimunace AI API for intelligent replies
- Typing indicators for natural interaction
- Conversation history management with `/clear` command
- Automatic reconnection and error handling
### Technologies
* Language: **Python 3.9+**
* Libraries: **Telethon, requests, asyncio**
* APIs: **Telegram API, Rimunace AI API**
* Deployment: **Docker (optional)**
## Installing
### Clone the Project
```shell
git clone https://github.com/l1ve4code/telegram-ai-assistant.git
```
### Replace Placeholders in `docker-compose.yml`
```yaml
services:
telegram-ai-bot:
build: .
container_name: telegram-ai-bot
environment:
- API_ID=YOUR_API_ID
- API_HASH=YOUR_API_HASH
- AI_API_KEY=YOUR_AI_API_KEY
restart: unless-stopped
```
## Running the Project
### Using Docker Compose
1. Build and start the container:
```shell
docker-compose up --build
```
2. Stop the container:
```shell
docker-compose down
```
### Running Locally
1. Install dependencies:
```shell
pip install -r requirements.txt
```
2. Run the script:
```shell
python main.py
```
## How It Works
### Main commands (send it to **Saved Messages**)
| Command | Description |
|-----------------------|---------------------------------|
| `/start` | Activate bot |
| `/stop` | Stop bot |
| `/set_user @username` | Change the conversation partner |
| `/clear` | Clear the dialog history |
### Automatic deletion of messages
- Your commands will delete after **1 second**
- The bot's responses are deleted after **10 seconds**
### Simple communication
1. Activate bot using command `/start`
2. Write to any user (who added the bot to the contacts)
3. The bot will respond based on the context of the conversation
### Work features
- Communication context saves **last 10 messages**
- The context is reset after restarting the bot
## Author
* Telegram: **[@live4code](https://t.me/live4code)**
* Email: **steven.marelly@gmail.com**
Good luck with your Telegram Chat AI Assistant! 🚀