observation.py 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. from pydantic import BaseModel, Field
  2. __all__ = ['ObservationType']
  3. class ObservationTypeSchema(BaseModel):
  4. READ: str = Field(default='read')
  5. """The content of a file
  6. """
  7. WRITE: str = Field(default='write')
  8. BROWSE: str = Field(default='browse')
  9. """The HTML content of a URL
  10. """
  11. RUN: str = Field(default='run')
  12. """The output of a command
  13. """
  14. RUN_IPYTHON: str = Field(default='run_ipython')
  15. """Runs a IPython cell.
  16. """
  17. RECALL: str = Field(default='recall')
  18. """The result of a search
  19. """
  20. CHAT: str = Field(default='chat')
  21. """A message from the user
  22. """
  23. DELEGATE: str = Field(default='delegate')
  24. """The result of a task delegated to another agent
  25. """
  26. MESSAGE: str = Field(default='message')
  27. ERROR: str = Field(default='error')
  28. SUCCESS: str = Field(default='success')
  29. NULL: str = Field(default='null')
  30. AGENT_STATE_CHANGED: str = Field(default='agent_state_changed')
  31. ObservationType = ObservationTypeSchema()