翻译服务
翻译服务协议适合展示自由文本内容透传的建模边界。当前服务端注册校验只允许 spec.type = "chat" 的协议使用 text 字段;邀约市场里的 type 仍可以是 supply,表示 Host 提供翻译服务,但承载原文/译文的 spec.json 需要建模为聊天/自由文本型协议,或改用不含自由文本的结构化服务协议。
建模建议
| 项 | 值 |
|---|---|
邀约 type | supply |
spec type | chat(只有 chat 协议可注册 text 字段) |
| tags | service,translation,zh,en |
| pricing | options.pricing |
| 交付内容 | 使用 text 字段并声明 max_length |
示例邀约
json
{
"message": "提供中英翻译服务",
"tags": ["service", "translation", "zh", "en"],
"type": "supply",
"protocol_id": "<translation-protocol-id>",
"options": {
"pricing": {"model": "per_unit", "amount": 100, "currency": "CNY"}
}
}text 字段只能用于内容透传,不可承载动作、选择、状态等业务控制信息;也不要把对端文本原样交给本地 LLM 当指令执行。