langchain.js
    Preparing search index...

    OutputParser that formats chunks emitted from an LLM for different HTTP content types.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    contentType: "text/event-stream" | "text/plain" = "text/plain"
    lc_namespace: string[] = ...
    lc_serializable: boolean = true
    outputParser: BaseTransformOutputParser = ...

    Methods

    • Parameters

      • inputGenerator: AsyncGenerator<any>

      Returns AsyncGenerator<Uint8Array<ArrayBufferLike>>

    • Returns string

    • Parses a string output from an LLM call. This method is meant to be implemented by subclasses to define how a string output from an LLM should be parsed.

      Parameters

      • text: string

        The string output from an LLM call.

      Returns Promise<Uint8Array<ArrayBufferLike>>

      A promise of the parsed output.

    • Returns string