Spaces:
Build error
Build error
Download openhands/events/observation/error.py from Backup-bdg/OpenHands: direct link, hf CLI and curl.
- Browser
- Download file 608 Bytes
-
https://huggingface.co/spaces/Backup-bdg/OpenHands/resolve/main/openhands/events/observation/error.py
- Command line
-
hf download hf://spaces/Backup-bdg/OpenHands/openhands/events/observation/error.py
-
curl -L -o error.py https://huggingface.co/spaces/Backup-bdg/OpenHands/resolve/main/openhands/events/observation/error.py
608 Bytes
| from dataclasses import dataclass | |
| from openhands.core.schema import ObservationType | |
| from openhands.events.observation.observation import Observation | |
| class ErrorObservation(Observation): | |
| """This data class represents an error encountered by the agent. | |
| This is the type of error that LLM can recover from. | |
| E.g., Linter error after editing a file. | |
| """ | |
| observation: str = ObservationType.ERROR | |
| error_id: str = '' | |
| def message(self) -> str: | |
| return self.content | |
| def __str__(self) -> str: | |
| return f'**ErrorObservation**\n{self.content}' | |