Class JsonMarkdownStructuredOutputParser<T>

A specific type of StructuredOutputParser that parses JSON data formatted as a markdown code snippet.

Type Parameters

  • T extends z.ZodTypeAny

Hierarchy

Constructors

Properties

schema: T

Methods

  • Returns a markdown code snippet with a JSON object formatted according to the schema.

    Parameters

    Returns string

    A markdown code snippet with a JSON object formatted according to the schema.

  • Parses the given text according to the schema.

    Parameters

    • text: string

      The text to parse

    Returns Promise<TypeOf<T>>

    The parsed output.

  • Returns SerializedNotImplemented

  • Creates a new StructuredOutputParser from a set of names and descriptions.

    Type Parameters

    • S extends {
          [key: string]: string;
      }

    Parameters

    • schemas: S

      An object where each key is a name and each value is a description

    Returns JsonMarkdownStructuredOutputParser<ZodObject<{
        [k: string]: T;
    }, "strip", ZodTypeAny, {}, {}>>

    A new instance of StructuredOutputParser.

Generated using TypeDoc