data_type.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. IMAGE = "image"
  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. RSSFEED = "rss_feed"
  31. BEEHIIV = "beehiiv"
  32. GOOGLE_DRIVE = "google_drive"
  33. DIRECTORY = "directory"
  34. SLACK = "slack"
  35. DROPBOX = "dropbox"
  36. TEXT_FILE = "text_file"
  37. EXCEL_FILE = "excel_file"
  38. AUDIO = "audio"
  39. class SpecialDataType(Enum):
  40. """
  41. SpecialDataType enum contains data types that are neither direct nor indirect, or simply require special attention.
  42. """
  43. QNA_PAIR = "qna_pair"
  44. class DataType(Enum):
  45. TEXT = DirectDataType.TEXT.value
  46. YOUTUBE_VIDEO = IndirectDataType.YOUTUBE_VIDEO.value
  47. PDF_FILE = IndirectDataType.PDF_FILE.value
  48. WEB_PAGE = IndirectDataType.WEB_PAGE.value
  49. SITEMAP = IndirectDataType.SITEMAP.value
  50. XML = IndirectDataType.XML.value
  51. DOCX = IndirectDataType.DOCX.value
  52. DOCS_SITE = IndirectDataType.DOCS_SITE.value
  53. NOTION = IndirectDataType.NOTION.value
  54. CSV = IndirectDataType.CSV.value
  55. MDX = IndirectDataType.MDX.value
  56. QNA_PAIR = SpecialDataType.QNA_PAIR.value
  57. IMAGE = IndirectDataType.IMAGE.value
  58. UNSTRUCTURED = IndirectDataType.UNSTRUCTURED.value
  59. JSON = IndirectDataType.JSON.value
  60. OPENAPI = IndirectDataType.OPENAPI.value
  61. GMAIL = IndirectDataType.GMAIL.value
  62. SUBSTACK = IndirectDataType.SUBSTACK.value
  63. YOUTUBE_CHANNEL = IndirectDataType.YOUTUBE_CHANNEL.value
  64. DISCORD = IndirectDataType.DISCORD.value
  65. CUSTOM = IndirectDataType.CUSTOM.value
  66. RSSFEED = IndirectDataType.RSSFEED.value
  67. BEEHIIV = IndirectDataType.BEEHIIV.value
  68. GOOGLE_DRIVE = IndirectDataType.GOOGLE_DRIVE.value
  69. DIRECTORY = IndirectDataType.DIRECTORY.value
  70. SLACK = IndirectDataType.SLACK.value
  71. DROPBOX = IndirectDataType.DROPBOX.value
  72. TEXT_FILE = IndirectDataType.TEXT_FILE.value
  73. EXCEL_FILE = IndirectDataType.EXCEL_FILE.value
  74. AUDIO = IndirectDataType.AUDIO.value