> For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt.

# Function: createStreamingParser()

> **createStreamingParser**(`schema`: [`LibraryJSONSchema`](/next/zh/api/genui/openui/core/interfaces/LibraryJSONSchema.md), `rootName?`: `string`): [`StreamParser`](/next/zh/api/genui/openui/core/interfaces/StreamParser.md)

根据组件库的 JSON Schema 文档创建流式解析器。传入 `library.toJSONSchema()` 获取 schema。

## Parameters

| Parameter   | Type                                                                                  |
| ----------- | ------------------------------------------------------------------------------------- |
| `schema`    | [`LibraryJSONSchema`](/next/zh/api/genui/openui/core/interfaces/LibraryJSONSchema.md) |
| `rootName?` | `string`                                                                              |

## Returns

[`StreamParser`](/next/zh/api/genui/openui/core/interfaces/StreamParser.md)
