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