langchain.js
    Preparing search index...

    Class JsonMarkdownStructuredOutputParser<T>

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

    Type Parameters

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    lc_namespace: string[] = ...
    schema: T

    Methods

    • Parses the given text according to the schema.

      Parameters

      • text: string

        The text to parse

      Returns Promise<InferInteropZodOutput<T>>

      The parsed output.

    • Returns any

    • 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]: ZodString },
              "strip",
              ZodTypeAny,
              { [key: string]: string },
              { [key: string]: string },
          >,
      >

      A new instance of StructuredOutputParser.

    • Returns string