feat(telegram): support Bot API 9.5 sendMessageDraft in group chats (#1)#6666
feat(telegram): support Bot API 9.5 sendMessageDraft in group chats (#1)#6666lekoOwO wants to merge 2 commits intoAstrBotDevs:masterfrom
Conversation
* Initial plan * feat: update python-telegram-bot to >=22.7 and remove is_private check for Bot API 9.5 Co-authored-by: lekoOwO <20151124+lekoOwO@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lekoOwO <20151124+lekoOwO@users.noreply.github.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此 PR 旨在顯著提升 AstrBot 在 Telegram 群組聊天中的流式輸出體驗。透過利用 Telegram Bot API 9.5 新增的 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
fixes #6659 |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
elegram Bot API 9.5 現已支援在群組聊天中使用
sendMessageDraft。在此之前,AstrBot 的 Telegram 適配器在群組中進行流式輸出時,必須回退(fallback)到頻繁編輯訊息的方式。本 PR 通過升級
python-telegram-bot並移除私聊限制,讓群組聊天也能享有更平滑的串流動畫體驗。Modifications / 改动点
astrbot/core/platform/sources/telegram/tg_event.py:
send_streaming中針對私聊(is_private)的顯式檢查。_send_streaming_draft進行流式輸出。pyproject.toml & requirements.txt:
python-telegram-bot依賴版本從>=22.6提升至>=22.7以支援新版 API。This is NOT a breaking change. / 这不是一个破坏性变更。
Screenshots or Test Results / 运行截图或测试结果
[Telegram] streaming output: using sendMessageDraft,且群組內出現草稿動畫效果。Checklist / 检查清单
requirements.txtandpyproject.toml.還需要我針對具體的測試日誌內容幫你補充到「運行截圖」一欄嗎?
Summary by Sourcery
Enable Telegram streaming responses to use sendMessageDraft in both private and group chats by leveraging Bot API 9.5+ support.
New Features:
Enhancements:
Build: