data_type.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. from enum import Enum
  2. class DirectDataType(Enum):
  3. """
  4. DirectDataType enum contains data types that contain raw data directly.
  5. """
  6. TEXT = "text"
  7. class IndirectDataType(Enum):
  8. """
  9. IndirectDataType enum contains data types that contain references to data stored elsewhere.
  10. """
  11. YOUTUBE_VIDEO = "youtube_video"
  12. PDF_FILE = "pdf_file"
  13. WEB_PAGE = "web_page"
  14. SITEMAP = "sitemap"
  15. DOCX = "docx"
  16. DOCS_SITE = "docs_site"
  17. NOTION = "notion"
  18. CSV = "csv"
  19. MDX = "mdx"
  20. class SpecialDataType(Enum):
  21. """
  22. SpecialDataType enum contains data types that are neither direct nor indirect, or simply require special attention.
  23. """
  24. QNA_PAIR = "qna_pair"
  25. class DataType(Enum):
  26. TEXT = DirectDataType.TEXT.value
  27. YOUTUBE_VIDEO = IndirectDataType.YOUTUBE_VIDEO.value
  28. PDF_FILE = IndirectDataType.PDF_FILE.value
  29. WEB_PAGE = IndirectDataType.WEB_PAGE.value
  30. SITEMAP = IndirectDataType.SITEMAP.value
  31. DOCX = IndirectDataType.DOCX.value
  32. DOCS_SITE = IndirectDataType.DOCS_SITE.value
  33. NOTION = IndirectDataType.NOTION.value
  34. CSV = IndirectDataType.CSV.value
  35. MDX = IndirectDataType.MDX.value
  36. QNA_PAIR = SpecialDataType.QNA_PAIR.value