Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sudoAlireza/GeminiBot
TelegramBot Tool to Interact with Google's Gemini AI Chatbot
https://github.com/sudoAlireza/GeminiBot
ai-chatbot chatbot gemini gemini-ai gemini-api gemini-pro gemini-pro-vision google-bard python-telegram-bot telegram-bot telegram-bot-api
Last synced: 3 months ago
JSON representation
TelegramBot Tool to Interact with Google's Gemini AI Chatbot
- Host: GitHub
- URL: https://github.com/sudoAlireza/GeminiBot
- Owner: sudoAlireza
- Created: 2024-02-12T17:01:04.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-02-15T20:18:25.000Z (9 months ago)
- Last Synced: 2024-02-16T19:28:48.493Z (9 months ago)
- Topics: ai-chatbot, chatbot, gemini, gemini-ai, gemini-api, gemini-pro, gemini-pro-vision, google-bard, python-telegram-bot, telegram-bot, telegram-bot-api
- Language: Python
- Homepage:
- Size: 771 KB
- Stars: 8
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GeminiBot - Personalized Telegram Bot
GeminiBot is a Telegram bot tailored to chat with Google's Gemini AI chatbot. Leveraging the official Gemini Bot on the Telegram platform, it engages users in dynamic conversations.
## Getting Started
### Prerequisites
Before deploying the bot, ensure you have the following:
- Python 3.10 installed on your system
- Obtain a [Telegram API token](https://core.telegram.org/bots) from BotFather
- Acquire a [Gemini API key](https://makersuite.google.com/app/apikey) from the Google Gemini website
- Get your Telegram Account id from [Show Json Bot](https://t.me/ShowJsonBot). Account id is different than Account username and you should set it in `.env` file to restrict GeminiBot to your account.##
https://github.com/sudoAlireza/GeminiBot/assets/87416117/beeb0fd2-73c6-4631-baea-2e3e3eeb9319
### Installation
1. Clone the repository:
```bash
git clone https://github.com/sudoAlireza/GeminiBot.git
```2. Navigate to the project directory:
```bash
cd GeminiBot
```3. Install the required dependencies:
```bash
pip install -r requirements.txt
```### Configuration
1. Create a file named `.env` in the project root and add your Telegram bot API token and Gemini API key:
```dotenv
TELEGRAM_BOT_TOKEN=
GEMINI_API_TOKEN=
AUTHORIZED_USER=
```2. Update the `safety_settings.json` file with appropriate safety settings for Gemini policies.
### Usage
Run GeminiBot using:
```bash
python main.py
```## Features
- Engage in online conversations with Google's Gemini AI chatbot
- Maintain conversation history for continuing or initiating new discussions
- Send images with captions to receive responses based on the image content. For example, the bot can read text within images and convert it to text.## To-Do
- [x] **Removing Specific Conversation from History**
- [ ] **Add Conversation Feature to Images Part**
- [ ] **Handle Long Responses in Multiple Messages**
- [ ] **Add Tests and Easy Deployment**## Documentation
For detailed instructions on using Telegram bots, refer to the [Telegram Bots Documentation](https://core.telegram.org/bots).
To begin with Gemini, refer to the [Gemini API: Quickstart with Python](https://ai.google.dev/tutorials/python_quickstart).
## Security
Ensure the security of your API keys and sensitive information. Follow best practices for securing API keys and tokens.
## Contributing
Contributions to GeminiBot are encouraged. Feel free to submit issues and pull requests.