title, type, tags, sources, last_updated
| title |
type |
tags |
sources |
last_updated |
| ChatCompletions |
concept |
|
|
2026-04-20 |
Overview
Chat Completions 是 OpenAI 标准的聊天补全 API 格式,通过 POST /v1/chat/completions 端点调用。Hermes Agent 的 API Server 默认使用此模式,无需额外配置。
Key Characteristics
- 请求格式:
{"model": "...", "messages": [...]}
- 响应格式:返回
choices[].message 完整回复
- 历史管理:每次请求携带完整对话历史
- 工具调用:支持
tools / tool_calls 参数
- 流式输出:支持
stream: true,实时推送 token
vs Responses API
| 特性 |
Chat Completions |
Responses API |
| 状态管理 |
客户端携带历史 |
服务端 previous_response_id |
| 事件流 |
逐 token 块 |
结构化事件(text_delta, function_call) |
| 稳定性 |
稳定(默认) |
实验性 |
| 适用场景 |
通用对话 |
需要服务端状态追踪的场景 |
See Also