feat: add QQ Bot media/file attachment support to send_message - #30347
feat: add QQ Bot media/file attachment support to send_message#30347Henry-916 wants to merge 1 commit into
Conversation
|
I have also developed a plugin with identical functionality. It is designed as a plugin to avoid interfering with core code and main program flow. 我也开发了一个相同功能的插件,做成“插件”方式是为了不干扰核心代码/主线流程。在弱小模型(gemma-4-E4B-it-Q4_K_M-unsloth.gguf)和强大模型(DeepSeek-4-pro )中均能使用。 |
|
Hey gavin-luo, thanks for sharing! Your plugin approach is definitely cleaner — no core code intrusion 👍 I went the PR route mainly because the QQ Bot adapter already had built-in That said, your adapter registration pattern seems more flexible — would be great to sync up on where the two approaches overlap sometime! gavin-luo,感谢分享!插件方案确实更优雅,不入侵核心代码 👍 我走 PR 路线主要是当时 Hermes 的 QQ Bot adapter 已经 built-in 了 话说回来,插件方案的适配器注册方式感觉更灵活,有空可以交流一下两个方案的兼容点~ |
|
Thanks for identifying a real gap: current Problems
Suggested changes
Automated hermes-sweeper review. |
Summary
This PR adds native image, video, audio, and file attachment delivery to QQ Bot via the
send_messagetool'sMEDIA:<path>tag syntax.Problem
QQ Bot had no path for MEDIA tag delivery. When users included
MEDIA:/path/to/image.jpgin a message to QQ Bot, thesend_messagetool dropped attachments with a "not supported" warning — despite the QQ Bot adapter already having fullsend_image_file/send_document/ chunked upload infrastructure.Other platforms (Telegram, Discord, Signal, Yuanbao, Feishu) already had this support, but QQ Bot was missing from the media-supported platforms list.
Changes
tools/send_message_tool.py_send_qqbot_media()async handler with chunked upload + RichMedia messaging_send_to_platform()qqbotgateway/run.pyset_active_adapter()gateway/platforms/qqbot/adapter.pyget_active_adapter()/set_active_adapter()singleton registrysend_qqbot_direct()helper for adapter-based media deliverygateway/platforms/qqbot/__init__.pyTesting