Content-Type: text/event-stream 的 HTTP 端点Content-Type 包含 text/event-stream,Apidog 会自动将返回的数据解析为 SSE 事件。| 格式 | 描述 |
|---|---|
| OpenAI API Compatible | 绝大多数 AI 模型提供商使用的格式 |
| Gemini API Compatible | Google 的 Gemini 模型格式 |
| Claude API Compatible | Anthropic 的 Claude 模型格式 |
| Ollama API Compatible | 用于本地部署 AI 模型的 JSON Streaming(NDJSON)格式 |
data: {"choices":[{"index":0,"message":{"role":"assistant","content":"H"},"logprobs":null,"finish_reason":"stop"}]}
data: {"choices":[{"index":0,"message":{"role":"assistant","content":"i"},"logprobs":null,"finish_reason":"stop"}]}content 字段,请使用:$.choices[0].message.content| 组件 | 描述 |
|---|---|
$ | JSON 对象的根 |
choices[0] | choices 数组的第一个元素 |
message.content | message 对象下的 content 属性 |
Hi