data_type.py 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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. XML = "xml"
  16. DOCX = "docx"
  17. DOCS_SITE = "docs_site"
  18. NOTION = "notion"
  19. CSV = "csv"
  20. MDX = "mdx"
  21. IMAGES = "images"
  22. UNSTRUCTURED = "unstructured"
  23. JSON = "json"
  24. OPENAPI = "openapi"
  25. GMAIL = "gmail"
  26. SUBSTACK = "substack"
  27. YOUTUBE_CHANNEL = "youtube_channel"
  28. DISCORD = "discord"
  29. CUSTOM = "custom"
  30. BEEHIIV = "beehiiv"
  31. class SpecialDataType(Enum):
  32. """
  33. SpecialDataType enum contains data types that are neither direct nor indirect, or simply require special attention.
  34. """
  35. QNA_PAIR = "qna_pair"
  36. class DataType(Enum):
  37. TEXT = DirectDataType.TEXT.value
  38. YOUTUBE_VIDEO = IndirectDataType.YOUTUBE_VIDEO.value
  39. PDF_FILE = IndirectDataType.PDF_FILE.value
  40. WEB_PAGE = IndirectDataType.WEB_PAGE.value
  41. SITEMAP = IndirectDataType.SITEMAP.value
  42. XML = IndirectDataType.XML.value
  43. DOCX = IndirectDataType.DOCX.value
  44. DOCS_SITE = IndirectDataType.DOCS_SITE.value
  45. NOTION = IndirectDataType.NOTION.value
  46. CSV = IndirectDataType.CSV.value
  47. MDX = IndirectDataType.MDX.value
  48. QNA_PAIR = SpecialDataType.QNA_PAIR.value
  49. IMAGES = IndirectDataType.IMAGES.value
  50. UNSTRUCTURED = IndirectDataType.UNSTRUCTURED.value
  51. JSON = IndirectDataType.JSON.value
  52. OPENAPI = IndirectDataType.OPENAPI.value
  53. GMAIL = IndirectDataType.GMAIL.value
  54. SUBSTACK = IndirectDataType.SUBSTACK.value
  55. YOUTUBE_CHANNEL = IndirectDataType.YOUTUBE_CHANNEL.value
  56. DISCORD = IndirectDataType.DISCORD.value
  57. CUSTOM = IndirectDataType.CUSTOM.value
  58. BEEHIIV = IndirectDataType.BEEHIIV.value