error.py 391 B

123456789101112131415
  1. from dataclasses import dataclass
  2. from openhands.core.schema import ObservationType
  3. from openhands.events.observation.observation import Observation
  4. @dataclass
  5. class ErrorObservation(Observation):
  6. """This data class represents an error encountered by the agent."""
  7. observation: str = ObservationType.ERROR
  8. @property
  9. def message(self) -> str:
  10. return self.content