Fix/weconbot image and file (#2085)

* fix:wecombot file and image

* fix: add enable-stream-reply config
This commit is contained in:
fdc310
2026-03-28 01:24:54 +08:00
committed by GitHub
parent c111bf1714
commit 498d030da9
3 changed files with 173 additions and 52 deletions

View File

@@ -277,14 +277,8 @@ class WecomBotAdapter(abstract_platform_adapter.AbstractMessagePlatformAdapter):
return {'stream': success}
async def is_stream_output_supported(self) -> bool:
"""智能机器人侧默认开启流式能力。
Returns:
bool: 恒定返回 True。
Example:
流水线执行阶段会调用此方法以确认是否启用流式。"""
return True
"""Whether streaming output is enabled for this bot instance."""
return self.config.get('enable-stream-reply', True)
async def send_message(self, target_type, target_id, message):
_ws_mode = not self.config.get('enable-webhook', False)

View File

@@ -75,6 +75,16 @@ spec:
type: string
required: false
default: ""
- name: enable-stream-reply
label:
en_US: Enable Stream Reply
zh_Hans: 启用流式回复
description:
en_US: If enabled, the bot will use streaming mode to reply messages
zh_Hans: 如果启用,机器人将使用流式模式回复消息
type: boolean
required: false
default: true
execution:
python:
path: ./wecombot.py