error.py 399 B

1234567891011121314151617
  1. from dataclasses import dataclass
  2. from .base import Observation
  3. from opendevin.schema import ObservationType
  4. @dataclass
  5. class AgentErrorObservation(Observation):
  6. """
  7. This data class represents an error encountered by the agent.
  8. """
  9. observation: str = ObservationType.ERROR
  10. @property
  11. def message(self) -> str:
  12. return "Oops. Something went wrong: " + self.content