mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-27 16:04:21 +00:00
121 lines
4.0 KiB
YAML
121 lines
4.0 KiB
YAML
apiVersion: v1
|
|
kind: MessagePlatformAdapter
|
|
|
|
metadata:
|
|
name: qqofficial-eba
|
|
label:
|
|
en_US: QQ Official API (EBA)
|
|
zh_Hans: QQ 官方 API (EBA)
|
|
zh_Hant: QQ 官方 API (EBA)
|
|
description:
|
|
en_US: QQ Official API adapter with Event-Based Agents support, using Webhook or WebSocket mode.
|
|
zh_Hans: QQ 官方 API 适配器(EBA 架构版本),支持 Webhook 和 WebSocket 两种连接模式。
|
|
zh_Hant: QQ 官方 API 適配器(EBA 架構版本),支援 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: 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 receives messages through LangBot's unified webhook endpoint. Otherwise it uses the QQ WebSocket gateway.
|
|
zh_Hans: 启用后,机器人通过 LangBot 统一 Webhook 接收消息;否则使用 QQ WebSocket 网关。
|
|
zh_Hant: 啟用後,機器人透過 LangBot 統一 Webhook 接收訊息;否則使用 QQ 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 adapter uses QQ Official streaming replies for C2C private messages.
|
|
zh_Hans: 启用后,适配器会对 C2C 私聊使用 QQ 官方流式回复。
|
|
zh_Hant: 啟用後,適配器會對 C2C 私聊使用 QQ 官方串流回覆。
|
|
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
|
|
|
|
supported_events:
|
|
- message.received
|
|
- platform.specific
|
|
|
|
supported_apis:
|
|
required:
|
|
- send_message
|
|
- reply_message
|
|
optional:
|
|
- get_message
|
|
- get_user_info
|
|
- get_friend_list
|
|
- get_group_info
|
|
- get_group_member_list
|
|
- get_group_member_info
|
|
- call_platform_api
|
|
|
|
platform_specific_apis:
|
|
- action: check_access_token
|
|
description: { en_US: "Check whether the cached QQ Official access token is usable", zh_Hans: "检查当前缓存的 QQ 官方 access token 是否可用" }
|
|
- action: refresh_access_token
|
|
description: { en_US: "Force refresh the QQ Official access token", zh_Hans: "强制刷新 QQ 官方 access token" }
|
|
- action: get_gateway_url
|
|
description: { en_US: "Return the QQ Official WebSocket gateway URL", zh_Hans: "获取 QQ 官方 WebSocket 网关地址" }
|
|
- action: get_mode
|
|
description: { en_US: "Return adapter receive and stream-reply mode", zh_Hans: "返回适配器接收模式和流式回复模式" }
|
|
|
|
execution:
|
|
python:
|
|
path: ./adapter.py
|
|
attr: QQOfficialAdapter
|
|
|