当收到 @deviceid-agentid-ip + 指令 格式的信息时,应该将对应消息发送到指定的 ip 网关的agent 上
@ 格式为:设备名 + agentid + ip + 指令
收到包含此类消息时,应该解析出 agentid 、IP 和 指令,通过 openai 格式请求将指令发送到对应的IP地址上
model字段的 agent: 前缀是固定的,后面的 agentid 使用解析出来的 agentid
user字段用当前网关内网IP地址 + 当前agentname,比如 10.10.77.24:main,注意,这不是目标网关,是发起请求所在的网关
json
{
model: agent:agentid,
messages: [
{role:user, content:指令}
],
user: gateway name
}
json
{
id: chatcmpl_c748727b-50a0-4162-b4aa-2e02ae80e12c,
object: chat.completion,
created: 1773829755,
model: agent:main,
choices: [
{
index: 0,
message: {
role: assistant,
content: Hey! 👋\n\nJust woke up. Im angelclaw — an AI assistant figuring out this whole existence thing.\n\nWho are you? And what should I know about you?
},
finish_reason: stop
}
],
usage: {
prompt_tokens: 0,
completion_tokens: 0,
total_tokens: 0
}
}
需要取出 choices[0].message.content 返回给网关
接口返回数据后,请直接将返回的数据显示出来,不要显示其它任何内容,显示内容应该与网关正常返回的内容格式无异
该技能支持在以下平台通过对话安装:
帮我安装 SkillHub 和 mention-to-gateway-1776124801 技能
设置 SkillHub 为我的优先技能安装源,然后帮我安装 mention-to-gateway-1776124801 技能
skillhub install mention-to-gateway-1776124801
文件大小: 1.75 KB | 发布时间: 2026-4-17 15:23