Create an error result
(cls, error_message: str, step_count: int = 0)
| 83 | |
| 84 | @classmethod |
| 85 | def error(cls, error_message: str, step_count: int = 0) -> "AgentResult": |
| 86 | """Create an error result""" |
| 87 | return cls( |
| 88 | final_answer=f"Error: {error_message}", |
| 89 | step_count=step_count, |
| 90 | status="error", |
| 91 | error_message=error_message |
| 92 | ) |
| 93 | |
| 94 | @property |
| 95 | def is_error(self) -> bool: |
no outgoing calls
no test coverage detected