Files
LangBot/templates/schema/platform.json
2025-02-14 13:12:49 +08:00

552 lines
25 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"type": "object",
"layout": "expansion-panels",
"properties": {
"platform-adapters": {
"type": "array",
"title": "消息平台适配器",
"default": {},
"items": {
"type": "object",
"oneOf": [
{
"title": "Nakuru 适配器",
"description": "用于接入 go-cqhttp",
"properties": {
"adapter": {
"type": "string",
"const": "nakuru"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"host": {
"type": "string",
"default": "127.0.0.1"
},
"ws_port": {
"type": "integer",
"default": 8080
},
"http_port": {
"type": "integer",
"default": 5700
},
"token": {
"type": "string",
"default": ""
}
}
},
{
"title": "aiocqhttp 适配器",
"description": "用于接入 Lagrange 等兼容 OneBot v11 协议的机器人框架仅支持反向ws",
"properties": {
"adapter": {
"type": "string",
"const": "aiocqhttp"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"host": {
"type": "string",
"default": "0.0.0.0",
"description": "监听的 IP 地址,一般就保持 0.0.0.0 就可以了。使用 aiocqhttp 时LangBot 作为服务端被动等待框架连接,请在 Lagrange 等框架中设置被动 ws 地址或者反向 ws 地址(具体视框架而定)为 LangBot 监听的地址,且路径为/ws例如ws://127.0.0.1:2280/ws"
},
"port": {
"type": "integer",
"default": 2290,
"description": "设置监听的端口默认2280需在 Lagrange 等框架中设置为与此处一致的端口"
},
"access-token": {
"type": "string",
"default": "",
"description": "设置访问密钥,与 Lagrange 等框架中设置的保持一致"
}
}
},
{
"title": "qq-botpy 适配器WebSocket",
"description": "用于接入 QQ 官方机器人 API",
"properties": {
"adapter": {
"type": "string",
"const": "qq-botpy"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"appid": {
"type": "string",
"default": "",
"description": "申请到的QQ官方机器人的appid"
},
"secret": {
"type": "string",
"default": "",
"description": "申请到的QQ官方机器人的secret"
},
"intents": {
"type": "array",
"description": "控制监听的事件类型需要填写才能接收到对应消息目前支持的事件类型有public_guild_messagesQQ 频道消息、direct_messageQQ 频道私聊消息、public_messagesQQ 群 和 列表私聊消息)",
"default": [
"public_guild_messages",
"direct_message",
"public_messages"
]
}
}
},
{
"title": "QQ 官方适配器WebHook",
"description": "用于接入 QQ 官方机器人 API",
"properties": {
"adapter": {
"type": "string",
"const": "qqofficial"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"appid": {
"type": "string",
"default": "",
"description": "申请到的QQ官方机器人的appid"
},
"secret": {
"type": "string",
"default": "",
"description": "申请到的QQ官方机器人的secret"
},
"port": {
"type": "integer",
"default": 2284,
"description": "监听的端口"
},
"token": {
"type": "string",
"default": "",
"description": "申请到的QQ官方机器人的token"
}
}
},
{
"title": "企业微信适配器",
"description": "用于接入企业微信",
"properties": {
"adapter": {
"type": "string",
"const": "wecom"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"host": {
"type": "string",
"default": "0.0.0.0",
"description": "监听的IP地址"
},
"port": {
"type": "integer",
"default": 2290,
"description": "监听的端口"
},
"corpid": {
"type": "string",
"default": "",
"description": "企业微信的corpid"
},
"secret": {
"type": "string",
"default": "",
"description": "企业微信的secret"
},
"token": {
"type": "string",
"default": "",
"description": "企业微信的token"
},
"EncodingAESKey": {
"type": "string",
"default": "",
"description": "企业微信的EncodingAESKey"
},
"contacts_secret": {
"type": "string",
"default": "",
"description": "企业微信的contacts_secret"
}
}
},
{
"title": "飞书适配器",
"description": "用于接入飞书",
"properties": {
"adapter": {
"type": "string",
"const": "lark"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"app_id": {
"type": "string",
"default": "",
"description": "飞书的app_id"
},
"app_secret": {
"type": "string",
"default": "",
"description": "飞书的app_secret"
},
"bot_name": {
"type": "string",
"default": "",
"description": "飞书的bot_name"
},
"enable-webhook": {
"type": "boolean",
"default": false,
"description": "是否启用webhook模式"
},
"port": {
"type": "integer",
"description": "设置监听的端口,开启callback event时需要设置",
"default": 2285
},
"encrypt-key": {
"type": "string",
"default": "",
"description": "设置加密密钥"
}
}
},
{
"title": "Discord 适配器",
"description": "用于接入 Discord",
"properties": {
"adapter": {
"type": "string",
"const": "discord"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"client_id": {
"type": "string",
"default": "",
"description": "Discord 的 client_id"
},
"token": {
"type": "string",
"default": "",
"description": "Discord 的 token"
}
}
},
{
"title": "gewechat 适配器",
"description": "用于接入个人微信",
"properties": {
"adapter": {
"type": "string",
"const": "gewechat"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"gewechat_url": {
"type": "string",
"default": "",
"description": "gewechat 的 url"
},
"port": {
"type": "integer",
"default": 2286,
"description": "gewechat 的端口"
},
"callback_url": {
"type": "string",
"default": "",
"description": "回调地址LangBot主机相对于gewechat服务器的地址"
},
"app_id": {
"type": "string",
"default": "",
"description": "gewechat 的 app_id"
},
"token": {
"type": "string",
"default": "",
"description": "gewechat 的 token"
}
}
},
{
"title": "微信公众号适配器",
"description": "用于接入微信公众号",
"properties": {
"adapter": {
"type": "string",
"const": "officialaccount"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器"
},
"token": {
"type": "string",
"default": "",
"description": "微信公众号的token"
},
"EncodingAESKey": {
"type": "string",
"default": "",
"description": "微信公众号的EncodingAESKey"
},
"AppID": {
"type": "string",
"default": "",
"description": "微信公众号的AppID"
},
"AppSecret": {
"type": "string",
"default": "",
"description": "微信公众号的AppSecret"
},
"host": {
"type": "string",
"default": "0.0.0.0",
"description": "监听的IP地址"
},
"port": {
"type": "integer",
"default": 2287,
"description": "监听的端口"
}
}
},
{
"title": "钉钉适配器",
"description": "用于接入钉钉",
"properties": {
"adapter": {
"type": "string",
"const": "dingtalk"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器",
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
}
},
"client_id": {
"type": "string",
"default": "",
"description": "钉钉的client_id"
},
"client_secret": {
"type": "string",
"default": "",
"description": "钉钉的client_secret"
},
"robot_code": {
"type": "string",
"default": "",
"description": "钉钉的robot_code"
},
"robot_name": {
"type": "string",
"default": "",
"description": "钉钉的robot_name"
}
}
},
{
"title": "Telegram 适配器",
"description": "用于接入 Telegram",
"properties": {
"adapter": {
"type": "string",
"const": "telegram"
},
"enable": {
"type": "boolean",
"default": false,
"description": "是否启用此适配器"
},
"token": {
"type": "string",
"default": "",
"description": "Telegram 的 token"
}
}
}
]
}
},
"track-function-calls": {
"type": "boolean",
"default": true,
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
},
"title": "跟踪内容函数调用",
"description": "开启之后,在对话中调用的内容函数记录也会发给用户,关闭后(false)仅会发给用户最终结果"
},
"quote-origin": {
"type": "boolean",
"default": false,
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
},
"title": "引用原消息",
"description": "在群内回复时是否引用原消息"
},
"at-sender": {
"type": "boolean",
"default": false,
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
},
"title": "是否 at 原用户",
"description": "在群内回复时是否@发送者"
},
"force-delay": {
"type": "object",
"default": {
"min": 0,
"max": 0
},
"title": "强制消息延迟范围",
"description": "在将响应内容发回给用户前的强制消息随机延迟时间范围,以防风控,单位是秒",
"properties": {
"min": {
"type": "integer",
"default": 0,
"description": "最小值,单位是秒"
},
"max": {
"type": "integer",
"default": 0,
"description": "最大值,单位是秒"
}
}
},
"long-text-process": {
"type": "object",
"title": "长消息处理策略",
"properties": {
"threshold": {
"type": "integer",
"default": 256,
"title": "长消息处理阈值",
"description": "当消息长度超过此阈值时,将启用长消息处理策略"
},
"strategy": {
"type": "string",
"default": "forward",
"title": "长消息处理策略",
"description": "长消息处理策略目前支持forward转发消息组件和image文字转图片。aiocqhttp 和 qq-botpy 不支持 forward 策略"
},
"font-path": {
"type": "string",
"description": "image的渲染字体。未设置时如果在windows下会尝试寻找系统的微软雅黑字体若找不到则转为forward策略。未设置时若不是windows系统则直接转为forward策略",
"default": ""
}
}
},
"hide-exception-info": {
"type": "boolean",
"default": true,
"layout": {
"comp": "switch",
"props": {
"color": "primary"
}
},
"title": "向用户隐藏AI接口的异常信息",
"description": "是否向用户隐藏AI的异常信息如果为true当请求AI接口出现异常时会返回一个错误的提示给用户。而把报错详情输出在控制台。"
}
}
}