该提交实现了完整的钉钉聊天渠道插件,包含: 1. 基础配置、账号管理与凭证校验 2. WebSocket长连接网关与消息去重 3. 消息接收/解析/分发与安全校验 4. 媒体文件上传下载与缓存 5. 互动卡片流式更新与回调处理 6. 群管理、命令支持与诊断工具 7. 完整的插件元数据与依赖声明
16 lines
332 B
Python
16 lines
332 B
Python
from __future__ import annotations
|
|
|
|
|
|
class DingTalkStreamingAdapter:
|
|
@property
|
|
def streaming_mode(self) -> str:
|
|
return "block"
|
|
|
|
@property
|
|
def block_streaming_config(self) -> dict:
|
|
return {
|
|
"chunk_size": 1024,
|
|
"max_chunks": 20,
|
|
"flush_interval_ms": 2000,
|
|
}
|