A class that provides a wrapper around the StructuredChatOutputParser
and OutputFixingParser classes. It extends the
AgentActionOutputParser class and allows for retrying the output
parsing using the OutputFixingParser if it is provided.
Example
constoutputParser = newStructuredChatOutputParserWithRetries.fromLLM( newChatOpenAI({ temperature:0 }), { toolNames: ["calculator", "random-number-generator"], }, ); constresult = awaitoutputParser.parse( "What is a random number between 5 and 10 raised to the second power?" );
A class that provides a wrapper around the
StructuredChatOutputParser
andOutputFixingParser
classes. It extends theAgentActionOutputParser
class and allows for retrying the output parsing using theOutputFixingParser
if it is provided.Example