Optional
options: RouterOutputParserInputReturns a markdown code snippet with a JSON object formatted according to the schema.
Optional
options: JsonMarkdownFormatInstructionsOptionsOptional. The options for formatting the instructions
A markdown code snippet with a JSON object formatted according to the schema.
Overrides the parse method from JsonMarkdownStructuredOutputParser. This method takes a string as input, attempts to parse it, and returns the parsed text. If the destination of the parsed text matches the defaultDestination, the destination is set to null. If the parsing fails, an OutputParserException is thrown.
The text to be parsed.
The parsed text as a Promise.
Static
fromCreates a new StructuredOutputParser from a set of names and descriptions.
An object where each key is a name and each value is a description
A new instance of StructuredOutputParser.
Static
fromCreates a new StructuredOutputParser from a Zod schema.
The Zod schema which the output should match
A new instance of StructuredOutputParser.
A type of output parser that extends the JsonMarkdownStructuredOutputParser. It is used to parse the output of a router in LangChain. The class takes a schema and an optional RouterOutputParserInput object as parameters.