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.
Run the core logic of this chain and add to output if desired.
Wraps _call and handles memory.
Optional
config: BaseCallbackConfig | CallbacksOptional
tags: string[]Invoke the chain with the provided input and returns the output.
Input values for the chain run.
Optional
config: BaseCallbackConfigOptional configuration for the Runnable.
Promise that resolves with the output of the chain run.
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