{"id":23059331,"url":"https://github.com/asukaminato0721/telegram-summary-bot","last_synced_at":"2025-03-31T06:01:12.094Z","repository":{"id":263488562,"uuid":"890054104","full_name":"asukaminato0721/telegram-summary-bot","owner":"asukaminato0721","description":"Summarize group chat with AI, LLM \u0026\u0026 query group chat, FREE to deploy your own, support img, link meta info, reply to, 支持中文检索.","archived":false,"fork":false,"pushed_at":"2025-03-16T03:16:48.000Z","size":287,"stargazers_count":91,"open_issues_count":5,"forks_count":12,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T01:00:04.241Z","etag":null,"topics":["chinese","gemini-ai","large-language-model","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"https://t.me/chat_summary_1_bot","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asukaminato0721.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"asukaminato0721"}},"created_at":"2024-11-17T22:16:03.000Z","updated_at":"2025-03-21T11:30:11.000Z","dependencies_parsed_at":"2024-12-04T12:22:39.043Z","dependency_job_id":"132540b4-5f5e-4905-aae6-3f2760952786","html_url":"https://github.com/asukaminato0721/telegram-summary-bot","commit_stats":null,"previous_names":["asukaminato0721/telegram-summary-bot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asukaminato0721%2Ftelegram-summary-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asukaminato0721%2Ftelegram-summary-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asukaminato0721%2Ftelegram-summary-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asukaminato0721%2Ftelegram-summary-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asukaminato0721","download_url":"https://codeload.github.com/asukaminato0721/telegram-summary-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246423731,"owners_count":20774820,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese","gemini-ai","large-language-model","telegram","telegram-bot"],"created_at":"2024-12-16T02:25:50.104Z","updated_at":"2025-03-31T06:01:11.846Z","avatar_url":"https://github.com/asukaminato0721.png","language":"TypeScript","funding_links":["https://github.com/sponsors/asukaminato0721"],"categories":[],"sub_categories":[],"readme":"# telegram group summary bot\n\n![image_fx_](https://github.com/user-attachments/assets/d9924ced-5310-4edc-9073-bdcc1df1dd6d)\n\n\u003e Image by imagen-3 on ImageFX, prompt \"an icon for telegram group message summarize and search message bot sketchy\"\n\nFeel scared when seeing 2000+ unread in groups? Now you can read them by LLM!\n\nUse d1, cf worker, ai gateway, gemini-2.0-flash.\n\n## NOTICE\n\nDue to current usage exceeded maximum DB size 500M `D1_ERROR: Exceeded maximum DB size`, please deploy your own bot. And you can keep a much longer log. I have disabled this bot to be add to new group.\n\n## Setup\n\nbot: \u003chttps://github.com/codebam/cf-workers-telegram-bot\u003e\n\nd1: \u003chttps://developers.cloudflare.com/d1/get-started/\u003e\n\nai gateway: \u003chttps://developers.cloudflare.com/ai-gateway/\u003e\n\ncheck wiki\n\n## Usage\n\n/summary 10\n\nsummarize newest 10 messages\n\n/summary 10h\n\n\nsummarize newest 10h messages\n\n/query word\n\ncan search cjk\n\n/ask question\n\nanswer question based on group chat\n\n/status\n\ncheck bot is alive\n\n## Cost\n\n**0**\n\nd1: 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)\n\ncf worker: so no more offline.(I hope so) [pricing](https://developers.cloudflare.com/workers/platform/pricing/#workers)\n\ngemini-2.0-flash: free for limited usage and huge context\n\nFor openAI or others,use the `getGenModel` from `openai.ts`, fill in the keys, it returns `Promise\u003cstring\u003e` so remember to `await`\n\n---\n\nThe Newest 4000 text messages will be kept, images will be kept for 2 days. May change in the future.\n\n---\n\n## TODO\n\n~~add method to import group history information so history info can be searched.~~\n\nmaybe auto-delte query result\n\n---\n\nTODO:\n\nmaybe word cloud?\n\n## Limitation\n\nThis bot will store chat history into my d1 database, so deploy your own bot is recommended. ~~Unless I am in your group~~.\n\nOnly messages sent by **user** and **after** the bot join the group can be summarized/query.\n\n\u003e 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.\n\u003e\n\u003e https://core.telegram.org/bots/faq#why-doesn-39t-my-bot-see-messages-from-other-bots\n\n\u003e You can't get older message than bot join.\n\u003e\n\u003e https://github.com/yagop/node-telegram-bot-api/issues/577\n\nIf you want to bypass these, check [luoxu](https://github.com/lilydjwg/luoxu), which uses userbot.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasukaminato0721%2Ftelegram-summary-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasukaminato0721%2Ftelegram-summary-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasukaminato0721%2Ftelegram-summary-bot/lists"}