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, and this page is available as Markdown at /next/zh/api/genui/openui/core/interfaces/StreamParser.md.
Lynx
  • 简体中文
  • 接口: StreamParser

    方法

    getResult()

    getResult(): ParseResult

    获取最新的 ParseResult,不消费新数据。

    返回

    ParseResult


    push()

    push(chunk: string): ParseResult

    传入下一个 SSE/流分片,并获取最新的 ParseResult。

    参数

    参数类型
    chunkstring

    返回

    ParseResult


    set()

    set(fullText: string): ParseResult

    设置完整文本:与内部缓冲区做 diff,只推送增量。如果文本被替换(而不是追加),会自动重置。

    参数

    参数类型
    fullTextstring

    返回

    ParseResult

    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。