How to handle errors raised by the agent's output parser.
Defaults to False
, which raises the error.
If true
, the error will be sent back to the LLM as an observation.
If a string, the string itself will be sent to the LLM as an observation.
If a callable function, the function will be called with the exception
as an argument, and the result of that function will be passed to the agent
as an observation.
Optional
maxOptional
memoryMethod that checks if the agent execution should continue based on the number of iterations.
The current number of iterations.
A boolean indicating whether the agent execution should continue.
Optional
config: any[]Use .batch() instead. Will be removed in 0.2.0.
This feature is deprecated and will be removed in the future.
It is not recommended for use.
Call the chain on all inputs in the list
Optional
config: anyOptional
tags: string[]Use .invoke() instead. Will be removed in 0.2.0.
Run the core logic of this chain and add to output if desired.
Wraps _call and handles memory.
Return a json-like object representing this chain.
Static
deserializeLoad a chain from a json-like object describing it.
Static
fromCreate from agent and a list of tools.
Generated using TypeDoc
A chain managing an agent using tools.
Example