mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
* style: Action and Observation use schema for unifying * merge from upstream/main * merge from upstream/main
18 lines
399 B
Python
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
|