Files
LangBot/src/langbot/pkg/platform/adapters/officialaccount/manifest.yaml
T
2026-05-28 16:59:26 +08:00

124 lines
4.0 KiB
YAML

apiVersion: v1
kind: MessagePlatformAdapter
metadata:
name: officialaccount-eba
label:
en_US: Official Account (EBA)
zh_Hans: 微信公众号 (EBA)
zh_Hant: 微信公眾號 (EBA)
description:
en_US: WeChat Official Account adapter with Event-Based Agents support
zh_Hans: 微信公众号适配器(EBA 架构版本),通过统一 Webhook 接收公众号消息
zh_Hant: 微信公眾號適配器(EBA 架構版本),透過統一 Webhook 接收公眾號訊息
icon: officialaccount.png
spec:
categories:
- china
help_links:
zh: https://link.langbot.app/zh/platforms/officialaccount
en: https://link.langbot.app/en/platforms/officialaccount
ja: https://link.langbot.app/ja/platforms/officialaccount
config:
- 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 Official Account webhook configuration.
zh_Hans: 复制此地址并粘贴到微信公众号的 Webhook 配置中。
zh_Hant: 複製此地址並貼到微信公眾號的 Webhook 設定中。
type: webhook-url
required: false
default: ""
- name: token
label:
en_US: Token
zh_Hans: 令牌
zh_Hant: 令牌
type: string
required: true
default: ""
- name: EncodingAESKey
label:
en_US: EncodingAESKey
zh_Hans: 消息加解密密钥
zh_Hant: 訊息加解密密鑰
type: string
required: true
default: ""
- name: AppID
label:
en_US: App ID
zh_Hans: 应用 ID
zh_Hant: 應用 ID
type: string
required: true
default: ""
- name: AppSecret
label:
en_US: App Secret
zh_Hans: 应用密钥
zh_Hant: 應用密鑰
type: string
required: true
default: ""
- name: Mode
label:
en_US: Mode
zh_Hans: 接入模式
zh_Hant: 接入模式
description:
en_US: "drop replies within the current callback; passive returns a loading message first and queues the real reply for the user's next message."
zh_Hans: "drop 会在当前回调内等待回复;passive 会先返回加载提示,并将真实回复排队到用户下一条消息。"
zh_Hant: "drop 會在目前回調內等待回覆;passive 會先回傳載入提示,並將真實回覆排隊到使用者下一則訊息。"
type: string
required: true
default: "drop"
- name: LoadingMessage
label:
en_US: Loading Message
zh_Hans: 加载消息
zh_Hant: 載入訊息
type: string
required: false
default: "AI正在思考中,请发送任意内容获取回复。"
- name: api_base_url
label:
en_US: API Base URL
zh_Hans: API 基础 URL
zh_Hant: API 基礎 URL
description:
en_US: Optional Official Account API base URL, useful when routing through a reverse proxy.
zh_Hans: 可选,若通过反向代理访问微信公众号 API,可修改此项。
zh_Hant: 可選,若透過反向代理存取微信公眾號 API,可修改此項。
type: string
required: false
default: "https://api.weixin.qq.com"
supported_events:
- message.received
- platform.specific
supported_apis:
required:
- reply_message
optional:
- get_message
- get_user_info
- get_friend_list
- call_platform_api
platform_specific_apis:
- action: get_mode
description: { en_US: "Return the configured Official Account reply mode", zh_Hans: "返回当前微信公众号回复模式" }
- action: get_cached_response_status
description: { en_US: "Inspect cached passive/drop reply state for diagnostics", zh_Hans: "查看被动回复缓存状态,用于诊断" }
execution:
python:
path: ./adapter.py
attr: OfficialAccountAdapter