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

Hierarchy

  • BaseTransformOutputParser<Uint8Array>
    • HttpResponseOutputParser

Constructors

Properties

contentType: "text/event-stream" | "text/plain" = "text/plain"
outputParser: BaseTransformOutputParser<unknown> = ...

Methods

  • 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>

    A promise of the parsed output.

Generated using TypeDoc