mirror of
https://github.com/langgenius/dify.git
synced 2026-11-25 13:32:43 +08:00
9 lines
424 B
Python
9 lines
424 B
Python
class AgentMaxIterationError(Exception):
|
|||
|
|
"""Raised when an agent runner exceeds the configured max iteration count."""
|
||
|
|
|
||
|
|
def __init__(self, max_iteration: int):
|
||
|
|
self.max_iteration = max_iteration
|
||
|
|
super().__init__(
|
||
|
|
f"Agent exceeded the maximum iteration limit of {max_iteration}. "
|
||
|
|
f"The agent was unable to complete the task within the allowed number of iterations."
|
||
|
|
)
|