data_type.py 2.2 KB

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