chat
Call hosted Token Factory models via an OpenAI-compatible API using prompts, messages, images, or tool calls; aggregate streams to avoid non-stream timeout cutoffs.
Instructions
调用 Token Factory 聊天模型(OpenAI 兼容;内部流式聚合,防 10 分钟非流式掐断)。
输入二选一:prompt(+可选 system)便捷形式,或完整 messages(role: system/user/assistant/tool)。 images 为 URL/data URL/本地路径列表,附加到最后一个 user 消息(仅视觉模型支持,见 list_models)。 reasoning_effort 跨模型安全值 low/medium(high 在 Qwen3.8-27B 上 400,xhigh 在 GLM-5.3-Flash 上 422); 思考文本在返回的 reasoning 字段。部分模型默认思考且消耗 max_tokens 预算,预算过小会得到空 content。 支持 response_format={"type":"json_object"} 与 tools/tool_choice。 注意:stop/seed/logprobs/top_k 等参数会被网关静默丢弃。免费但计入每日 pts 配额;禁止生产用途。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"model": "<model>"
},
"name": "chat"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | ||
| tools | No | ||
| top_p | No | ||
| images | No | ||
| prompt | No | ||
| system | No | ||
| messages | No | ||
| max_tokens | No | ||
| temperature | No | ||
| tool_choice | No | ||
| response_format | No | ||
| reasoning_effort | No |