新增小红书、XMPP、元宝、Zalo 四个渠道扩展。 小红书渠道扩展主要模块:config, gateway, webhook, outbound, streaming, pairing, security, dedupe, media, status, window XMPP 渠道扩展主要模块:plugin, config, gateway, outbound, streaming, pairing, security, dedupe, accounts, commands, muc, rate_limiter, stanza_utils, status, monitor 元宝渠道扩展主要模块:plugin, client, config_schema, gateway, outbound(chunk/queue/transport), inbound(dispatcher), streaming, pairing, security, accounts, actions, commands, codec(biz/conn), session, shared, utils Zalo 渠道扩展主要模块:api, config, gateway, webhook, outbound, pairing, security, session, polling, monitor, status
133 lines
5.5 KiB
Python
133 lines
5.5 KiB
Python
YUANBAO_CONFIG_SCHEMA = {
|
|
"type": "object",
|
|
"properties": {
|
|
"accounts": {
|
|
"type": "object",
|
|
"description": "Yuanbao 账户配置",
|
|
"additionalProperties": {
|
|
"type": "object",
|
|
"properties": {
|
|
"appKey": {
|
|
"type": "string",
|
|
"description": "Yuanbao Open API AppKey",
|
|
"x-secret": True,
|
|
},
|
|
"appSecret": {
|
|
"type": "string",
|
|
"description": "Yuanbao Open API AppSecret",
|
|
"x-secret": True,
|
|
},
|
|
"name": {"type": "string", "description": "账户名称"},
|
|
"apiDomain": {
|
|
"type": "string",
|
|
"description": "API 域名",
|
|
"default": "bot.yuanbao.tencent.com",
|
|
},
|
|
"wsUrl": {
|
|
"type": "string",
|
|
"description": "WebSocket 连接地址",
|
|
"default": "wss://bot-wss.yuanbao.tencent.com/wss/connection",
|
|
},
|
|
"enabled": {"type": "boolean", "description": "是否启用", "default": True},
|
|
"maxChars": {
|
|
"type": "integer",
|
|
"description": "单条消息最大字符数",
|
|
"default": 3000,
|
|
},
|
|
"mergeText": {
|
|
"type": "string",
|
|
"enum": ["merge-text", "immediate"],
|
|
"description": "出站消息合并策略",
|
|
"default": "merge-text",
|
|
},
|
|
"mergeTextMinChars": {
|
|
"type": "integer",
|
|
"description": "merge-text 最小合并字符数",
|
|
"default": 2800,
|
|
},
|
|
"mergeTextMaxChars": {
|
|
"type": "integer",
|
|
"description": "merge-text 最大合并字符数",
|
|
"default": 3000,
|
|
},
|
|
"mergeTextIdleMs": {
|
|
"type": "integer",
|
|
"description": "merge-text 空闲超时 (ms)",
|
|
"default": 5000,
|
|
},
|
|
"mergeTextOverflow": {
|
|
"type": "string",
|
|
"enum": ["split", "stop"],
|
|
"description": "溢出处理策略",
|
|
"default": "split",
|
|
},
|
|
"disableBlockStreaming": {
|
|
"type": "boolean",
|
|
"description": "禁用块级流式输出",
|
|
"default": False,
|
|
},
|
|
"blockStreamingCoalesceMinChars": {
|
|
"type": "integer",
|
|
"default": 2800,
|
|
},
|
|
"blockStreamingCoalesceMaxChars": {
|
|
"type": "integer",
|
|
"default": 3000,
|
|
},
|
|
"blockStreamingCoalesceIdleMs": {
|
|
"type": "integer",
|
|
"default": 1000,
|
|
},
|
|
"replyToMode": {
|
|
"type": "string",
|
|
"enum": ["off", "first", "all"],
|
|
"description": "引用回复模式",
|
|
"default": "first",
|
|
},
|
|
"dmPolicy": {
|
|
"type": "string",
|
|
"enum": ["open", "pairing", "allowlist", "disabled"],
|
|
"description": "私聊访问策略",
|
|
"default": "open",
|
|
},
|
|
"pairingTtlSeconds": {
|
|
"type": "integer",
|
|
"description": "配对码有效期 (秒)",
|
|
"default": 3600,
|
|
},
|
|
"sessionKeyTtlSeconds": {
|
|
"type": "integer",
|
|
"description": "Session Key 去重 TTL (秒)",
|
|
"default": 300,
|
|
},
|
|
"historyLimit": {
|
|
"type": "integer",
|
|
"description": "群聊上下文历史消息数",
|
|
"default": 100,
|
|
},
|
|
"groupMentionRequired": {
|
|
"type": "boolean",
|
|
"description": "群聊是否需要 @提及",
|
|
"default": True,
|
|
},
|
|
"debugWhitelist": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"description": "调试白名单",
|
|
},
|
|
"mediaMaxMb": {
|
|
"type": "integer",
|
|
"description": "媒体文件最大大小 (MB)",
|
|
"default": 20,
|
|
},
|
|
"defaultAccount": {
|
|
"type": "boolean",
|
|
"description": "设为默认账户(未指定账户时路由到此账户)",
|
|
"default": False,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
}
|