langchain.js
    Preparing search index...

    Class JsonOutputFunctionsParser<Output>

    Class for parsing the output of an LLM into a JSON object. Uses an instance of OutputFunctionsParser to parse the output.

    Type Parameters

    • Output extends object = object

    Hierarchy (View Summary)

    Index

    Constructors

    • Type Parameters

      • Output extends object = object

      Parameters

      • Optionalconfig: any

      Returns JsonOutputFunctionsParser<Output>

    Properties

    argsOnly: boolean = true
    lc_namespace: string[] = ...
    lc_serializable: boolean = true
    outputParser: OutputFunctionsParser

    Methods

    • Parameters

      • prev: unknown
      • next: unknown

      Returns undefined | JSONPatchOperation[]

    • Returns string

    • Parameters

      • text: string

      Returns Promise<Output>

    • Parameters

      • generations: ChatGeneration[]

      Returns Promise<undefined | Output>

    • Parses the output and returns a JSON object. If argsOnly is true, only the arguments of the function call are returned.

      Parameters

      • generations: Generation[] | ChatGeneration[]

        The output of the LLM to parse.

      Returns Promise<Output>

      A JSON object representation of the function call or its arguments.

    • Returns string