Parses the given text and returns an AgentAction or AgentFinish
object. Throws an OutputParserException if the parsing fails.
The text to parse.
Optionalcallbacks: anyA Promise that resolves to an AgentAction or AgentFinish object.
StaticfromLLMCreates a new StructuredChatOutputParserWithRetries instance from a
BaseLanguageModel and options. The options can include a base parser
and tool names.
A BaseLanguageModel instance.
Options for creating a StructuredChatOutputParserWithRetries instance.
A new StructuredChatOutputParserWithRetries instance.
A class that provides a wrapper around the
StructuredChatOutputParserandOutputFixingParserclasses. It extends theAgentActionOutputParserclass and allows for retrying the output parsing using theOutputFixingParserif it is provided.Example