observation.py 831 B

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