error.py 341 B

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