success.py 395 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 SuccessObservation(Observation):
  6. """This data class represents the result of a successful action."""
  7. observation: str = ObservationType.SUCCESS
  8. @property
  9. def message(self) -> str:
  10. return self.content