browse.py 453 B

123456789101112131415161718192021
  1. from dataclasses import dataclass
  2. from .base import Observation
  3. from opendevin.schema import ObservationType
  4. @dataclass
  5. class BrowserOutputObservation(Observation):
  6. """
  7. This data class represents the output of a browser.
  8. """
  9. url: str
  10. screenshot: str
  11. status_code: int = 200
  12. error: bool = False
  13. observation: str = ObservationType.BROWSE
  14. @property
  15. def message(self) -> str:
  16. return 'Visited ' + self.url