translate_en2zh

translate_en2zh只读扩展
英译中

通过 POST http://127.0.0.1:3000/translate_en2zh(请求体为 JSON 参数)或 WebSocket 调用。

输入参数

参数 类型 必填 默认 说明
words raw

返回 (data)

{ words }:与输入等长的中文译文字符串数组。

所有响应都包裹在标准信封中:{ "status": "ok", "retcode": 0, "data": ... }。下表描述 data 字段。

字段 类型 必填 说明
words string[] 译文数组
原始 JSON Schema
{
  "type": "object",
  "properties": {
    "words": {
      "type": "array",
      "description": "译文数组",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "words"
  ]
}

调用示例

curl
Python
JavaScript
Go
SnowLuma SDK
curl -X POST http://127.0.0.1:3000/translate_en2zh \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <access-token>' \
  -d '{"words":""}'
在用 AI 助手?

支持 MCP 的客户端可直接发现并调用本动作,无需手写 HTTP。见 MCP 接入