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

Hierarchy (view full)

  • Toolkit<Uint8Array>
    • HttpResponseOutputParser

Constructors

Properties

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

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