> ## Documentation Index
> Fetch the complete documentation index at: https://docs.viviai.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# 如何启用流式输出？

* **OpenAI Chat：** 在请求体中设置 `stream: true`。
* **Anthropic：** 在请求体中设置 `stream: true`。
* **Gemini：** 改用 `streamGenerateContent?alt=sse`。

三种协议的事件结构不同，请使用各自的解析方式。

完整示例：[OpenAI Chat](https://docs.viviai.cc/openai-chat.md) · [Gemini](https://docs.viviai.cc/gemini.md) · [Anthropic](https://docs.viviai.cc/anthropic.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.