Skip to content

Commit

Permalink
docs on output handler max_iterations
Browse files Browse the repository at this point in the history
  • Loading branch information
whimo committed Jul 9, 2024
1 parent 44f8883 commit 400c7b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/Advanced output handling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
"source": [
"In case the critic is not satisfied, the `InvalidOutput` exception will be returned to the agent, as if a regular tool was called. If everything is OK, we just return the agent's output.\n",
"\n",
"The MotleyOutputHandler constructor has a `max_iterations` argument. It's the maximum number of times the exception will be returned to the agent. If the agent doesn't provide a valid output after `max_iterations`, a `OutputHandlerMaxIterationsExceeded` exception will be raised. It has `last_call_args` and `last_call_kwargs` attributes that store the arguments that the agent used in the last call. Also, it stores the last exception that was raised in the `last_exception` attribute.\n",
"\n",
"The output schema is inferred automatically from the `handle_output` method signature. You can also specify it directly using the `_args_schema` property (see below)."
]
},
Expand Down

0 comments on commit 400c7b5

Please sign in to comment.