Method to parse the completion using the parser. If the initial parsing fails, it uses the retryChain to attempt to fix the output and retry the parsing process.
The completion to be parsed.
Optional
callbacks: CallbacksOptional callbacks to be used during parsing.
The parsed output.
Static
fromLLMStatic method to create a new instance of OutputFixingParser using a given language model, parser, and optional fields.
The language model to be used.
The parser to be used.
Optional
fields: { Optional fields which may contain a prompt.
Optional
prompt?: BasePromptTemplate<any, BasePromptValue, any>A new instance of OutputFixingParser.
Generated using TypeDoc
Class that extends the BaseOutputParser to handle situations where the initial parsing attempt fails. It contains a retryChain for retrying the parsing process in case of a failure.