This project is a simple Telegram chatbot that integrates with Cohere AI to generate responses to user messages. The bot listens for any text messages, sends them to the AI model, and returns the generated response.
- Responds to any text message in the chat
- Uses Cohere's AI model to generate intelligent responses
- Easy to set up and customize
To run this bot, you will need:
- Python 3.6+
- A Cohere API key
- A Telegram Bot API token
-
Clone the repository:
git clone https://github.com/derssen/AI-Telegram-Chatbot.git cd your-repo-name -
Install the required Python libraries:
pip install -r requirements.txt
-
Create a
.envfile (optional) to store your API keys:echo "AI_API_KEY=your-cohere-api-key" > .env echo "API_TOKEN=your-telegram-bot-token" >> .env
-
Update the script with your API keys:
- Replace
'your-cohere-api-key-here'with your Cohere API key. - Replace
'your-telegram-bot-token-here'with your Telegram Bot API token.
- Replace
-
Run the bot:
python bot.py
-
Start a conversation with your bot in Telegram. Any message you send will be processed by the AI, and it will generate a response.
This project is licensed under the MIT License - see the LICENSE file for details.