Files
OpenHands/opendevin/observation/error.py
Robert Brennan effac868c1 Implement deserialization for actions and observations (#359)
* action deserializing

* add observation deserialization

* add tests

* refactor agents with serialization

* fix some errors

* fix lint

* fix json parser
2024-03-30 10:06:25 -04:00

17 lines
341 B
Python

from dataclasses import dataclass
from .base import Observation
@dataclass
class AgentErrorObservation(Observation):
"""
This data class represents an error encountered by the agent.
"""
observation : str = "error"
@property
def message(self) -> str:
return "Oops. Something went wrong: " + self.content