1.6 KiB
1.6 KiB
企业微信智能机器人 API 插件
两个接口均暂不校验 Authorization 或 API Key。
问答小助手
- OpenAPI 配置地址:
/api/assistant/openapi/general.json - 业务接口:
POST /api/assistant/general/query - 请求:
{
"query": "测试表"
}
query同时兼容content、userText、message和input。- 处理逻辑保持不变:直接调用原有扣子
wecom-default工作流,不经过 DeepSeek 语义识别。
运动馆智能助手
- OpenAPI 配置地址:
/api/assistant/openapi/sports-venue.json - 业务接口:
POST /api/assistant/sports-venue/query - 请求:
{
"query": "查看本月EC电话合规监控日报"
}
query同时兼容content、userText、message和input。- UserID 由后端从企业微信调用上下文请求头自动读取,不需要作为插件业务参数填写。
- 本地联调仍兼容请求体中的
userId、wecomUserId、userid和user_id。 - 处理逻辑保持不变:DeepSeek 语义识别 → 日期解析 → UserID 数据权限 → 对应日报处理器。
- 同一个 UserID 同时只能执行一条运动馆指令。
返回结构
{
"success": true,
"code": 0,
"content": "机器人直接回复给用户的内容",
"attachments": [
{
"type": "excel",
"name": "日报.xlsx",
"downloadUrl": "http://agent.yuedongsports.com/api/assistant/files/文件ID"
}
]
}
机器人应将 content 作为最终回复。Excel 下载链接会同时附加到 content 中,文件链接有效期为 30 分钟。