Files
OpenHands/opendevin/observation/error.py
Leo 3313e473ea style: Action and Observation use schema for unifying (#494)
* style: Action and Observation use schema for unifying

* merge from upstream/main

* merge from upstream/main
2024-04-06 13:46:07 -04:00

18 lines
399 B
Python

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