This Telegram bot is designed to summarize messages containing specific keywords using the OpenAI GPT-3.5 Turbo model. It provides a convenient way to extract key information from lengthy conversations or channels.
IMPORTANT: To actually use the summarization feature, telethon requires verification via phone number and verification code. To use this bot fully, run it locally and set up your own bot via BotFather.
- Keyword-based message scraping: Use the
/scrape
command followed by a keyword to scrape messages from Telegram channels that contain the specified keyword. - Summarization: The bot summarizes the scraped messages using the GPT-3.5 Turbo model and provides a concise summary as a response.
- More Information: If you want to receive more information on the previous summary, use the
/more
command to request additional details from the GPT-3.5 Turbo model.
To run this bot, you need the following prerequisites:
- Python 3.7 or higher
- Python packages listed in
requirements.txt
#TODO
Before running the bot, make sure to set up the necessary API keys and tokens in the config.py
file. Fill in the placeholders with your actual API keys and tokens.
- Clone this repository to your local machine.
- Install the required Python packages by running
pip install -r requirements.txt
. #TODO
- Run the bot using
python3 telebot.py
. - Start a conversation with the bot on Telegram.
- Authorize using
/auth
command. Credentials can be set up in the config file, and are used to associate users with their respective session files. - Use the
/scrape
command followed by a keyword to initiate the message scraping process. Other commands can be found in the menu. - The bot will provide a summarized response based on the scraped messages.
- If you want more information on the previous summary, use the
/more
command.
Contributions to this project are welcome. If you have any suggestions, bug reports, or feature requests, please open an issue or submit a pull request.
This project is licensed under the MIT License.