mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-12 16:56:02 +00:00
Cloud/NAT deployments couldn't complete WeCom-family / Official Account / QQ Official setup because the trusted-IP (IP whitelist) value — the server's egress IPs — was nowhere visible in LangBot. - config.yaml: new system.outbound_ips list (env: SYSTEM__OUTBOUND_IPS, comma-separated), exposed via GET /api/v1/system/info - dynamic form: generic __system.*-named display-only fields resolved from systemContext (same namespace as show_if), one read-only row per value with a copy button, excluded from form state and emitted values; hidden entirely when the deployment provides no IPs - manifests: trusted-IP display field for wecom, wecomcs, wecombot, officialaccount, qqofficial Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
102 lines
3.4 KiB
YAML
102 lines
3.4 KiB
YAML
apiVersion: v1
|
||
kind: MessagePlatformAdapter
|
||
metadata:
|
||
name: qqofficial
|
||
label:
|
||
en_US: QQ Official API
|
||
zh_Hans: QQ 官方 API
|
||
zh_Hant: QQ 官方 API
|
||
description:
|
||
en_US: QQ Official API (Webhook / WebSocket)
|
||
zh_Hans: QQ 官方 API,支持 Webhook 和 WebSocket 两种连接模式
|
||
zh_Hant: QQ 官方 API,支援 Webhook 和 WebSocket 兩種連線模式
|
||
icon: qqofficial.svg
|
||
spec:
|
||
categories:
|
||
- china
|
||
help_links:
|
||
zh: https://link.langbot.app/zh/platforms/qqofficial
|
||
en: https://link.langbot.app/en/platforms/qqofficial
|
||
ja: https://link.langbot.app/ja/platforms/qqofficial
|
||
config:
|
||
- name: __system.outbound_ips
|
||
label:
|
||
en_US: IP Whitelist
|
||
zh_Hans: IP 白名单
|
||
zh_Hant: IP 白名單
|
||
description:
|
||
en_US: Add these outbound IPs of the LangBot server to the IP whitelist in the development settings of the QQ Open Platform
|
||
zh_Hans: 请将这些 LangBot 服务器的出网 IP 添加到 QQ 开放平台开发设置中的 IP 白名单
|
||
zh_Hant: 請將這些 LangBot 伺服器的出網 IP 加入 QQ 開放平台開發設定中的 IP 白名單
|
||
type: array[string]
|
||
required: false
|
||
default: []
|
||
- name: appid
|
||
label:
|
||
en_US: App ID
|
||
zh_Hans: 应用ID
|
||
zh_Hant: 應用ID
|
||
type: string
|
||
required: true
|
||
default: ""
|
||
- name: secret
|
||
label:
|
||
en_US: Secret
|
||
zh_Hans: 密钥
|
||
zh_Hant: 密鑰
|
||
type: string
|
||
required: true
|
||
default: ""
|
||
- name: token
|
||
label:
|
||
en_US: Token
|
||
zh_Hans: 令牌
|
||
zh_Hant: 令牌
|
||
type: string
|
||
required: true
|
||
default: ""
|
||
- name: enable-webhook
|
||
label:
|
||
en_US: Enable Webhook Mode
|
||
zh_Hans: 启用Webhook模式
|
||
zh_Hant: 啟用 Webhook 模式
|
||
description:
|
||
en_US: If enabled, the bot will use webhook mode to receive messages. Otherwise, it will use WebSocket mode
|
||
zh_Hans: 如果启用,机器人将使用 Webhook 模式接收消息。否则,将使用 WebSocket 模式
|
||
zh_Hant: 如果啟用,機器人將使用 Webhook 模式接收訊息。否則,將使用 WebSocket 模式
|
||
type: boolean
|
||
required: true
|
||
default: false
|
||
- name: enable-stream-reply
|
||
label:
|
||
en_US: Enable Stream Reply Mode
|
||
zh_Hans: 启用流式回复模式
|
||
zh_Hant: 啟用串流回覆模式
|
||
description:
|
||
en_US: If enabled, the bot will use streaming mode to reply messages (C2C only)
|
||
zh_Hans: 如果启用,机器人将使用流式方式回复消息(仅私聊)
|
||
zh_Hant: 如果啟用,機器人將使用串流方式回覆訊息(僅私聊)
|
||
type: boolean
|
||
required: true
|
||
default: false
|
||
- name: webhook_url
|
||
label:
|
||
en_US: Webhook Callback URL
|
||
zh_Hans: Webhook 回调地址
|
||
zh_Hant: Webhook 回調地址
|
||
description:
|
||
en_US: Copy this URL and paste it into your QQ Official API webhook configuration
|
||
zh_Hans: 复制此地址并粘贴到 QQ 官方 API 的 Webhook 配置中
|
||
zh_Hant: 複製此地址並貼到 QQ 官方 API 的 Webhook 設定中
|
||
type: webhook-url
|
||
required: false
|
||
default: ""
|
||
show_if:
|
||
field: enable-webhook
|
||
operator: eq
|
||
value: true
|
||
execution:
|
||
python:
|
||
path: ./qqofficial.py
|
||
attr: QQOfficialAdapter
|