Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asukaminato0721/telegram-summary-bot
Summarize group chat with AI, LLM && query group chat, FREE to deploy your own, support img, 支持中文检索.
https://github.com/asukaminato0721/telegram-summary-bot
chinese gemini-ai large-language-model telegram telegram-bot
Last synced: about 2 months ago
JSON representation
Summarize group chat with AI, LLM && query group chat, FREE to deploy your own, support img, 支持中文检索.
- Host: GitHub
- URL: https://github.com/asukaminato0721/telegram-summary-bot
- Owner: asukaminato0721
- License: apache-2.0
- Created: 2024-11-17T22:16:03.000Z (3 months ago)
- Default Branch: master
- Last Pushed: 2024-12-12T16:45:12.000Z (about 2 months ago)
- Last Synced: 2024-12-12T17:14:38.384Z (about 2 months ago)
- Topics: chinese, gemini-ai, large-language-model, telegram, telegram-bot
- Language: TypeScript
- Homepage: https://t.me/chat_summary_1_bot
- Size: 98.6 KB
- Stars: 27
- Watchers: 1
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# telegram group summary bot
![image_fx_](https://github.com/user-attachments/assets/d9924ced-5310-4edc-9073-bdcc1df1dd6d)
> Image by imagen-3 on ImageFX, prompt "an icon for telegram group message summarize and search message bot sketchy"
Feel scared when seeing 2000+ unread in groups? Now you can read them by LLM!
Use d1, cf worker, ai gateway, gemini-1.5-flash.
## Setup
bot:
d1:
ai gateway:
check wiki
## Usage
/summary 10
summarize newest 10 messages
/summary 10h
summarize newest 10h messages
/query word
can search cjk
/ask question
answer question based on group chat
/status
check bot is alive
## Cost
**0**
d1: telegram bot can't read info in the history, only newly sent info, so use database to keep them. [pricing](https://developers.cloudflare.com/d1/platform/pricing/#billing-metrics)
cf worker: so no more offline.(I hope so) [pricing](https://developers.cloudflare.com/workers/platform/pricing/#workers)
gemini-1.5-flash: [free for limited usage and huge context](https://ai.google.dev/pricing?hl=zh-cn#1_5flash)
For openAI or others,use the `getGenModel` from `openai.ts`, fill in the keys, it returns `Promise` so remember to `await`
---
Data will be kept for 1 month, may change in the future.
---
## TODO
add method to import group history information so history info can be searched.
maybe auto-delte query result
---
TODO:
maybe word cloud?
## Limitation
This bot will store chat history into my d1 database, so deploy your own bot is recommended. ~~Unless I am in your group~~.
Only messages sent by **user** and **after** the bot join the group can be summarized/query.
> Why doesn't my bot see messages from other bots? Bots talking to each other could potentially get stuck in unwelcome loops. To avoid this, we decided that bots will not be able to see messages from other bots regardless of mode.
>
> https://core.telegram.org/bots/faq#why-doesn-39t-my-bot-see-messages-from-other-bots> You can't get older message than bot join.
>
> https://github.com/yagop/node-telegram-bot-api/issues/577If you want to bypass these, check [luoxu](https://github.com/lilydjwg/luoxu), which uses userbot.