data_type.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. POSTGRES = "postgres"
  27. MYSQL = "mysql"
  28. SLACK = "slack"
  29. class SpecialDataType(Enum):
  30. """
  31. SpecialDataType enum contains data types that are neither direct nor indirect, or simply require special attention.
  32. """
  33. QNA_PAIR = "qna_pair"
  34. class DataType(Enum):
  35. TEXT = DirectDataType.TEXT.value
  36. YOUTUBE_VIDEO = IndirectDataType.YOUTUBE_VIDEO.value
  37. PDF_FILE = IndirectDataType.PDF_FILE.value
  38. WEB_PAGE = IndirectDataType.WEB_PAGE.value
  39. SITEMAP = IndirectDataType.SITEMAP.value
  40. XML = IndirectDataType.XML.value
  41. DOCX = IndirectDataType.DOCX.value
  42. DOCS_SITE = IndirectDataType.DOCS_SITE.value
  43. NOTION = IndirectDataType.NOTION.value
  44. CSV = IndirectDataType.CSV.value
  45. MDX = IndirectDataType.MDX.value
  46. QNA_PAIR = SpecialDataType.QNA_PAIR.value
  47. IMAGES = IndirectDataType.IMAGES.value
  48. UNSTRUCTURED = IndirectDataType.UNSTRUCTURED.value
  49. JSON = IndirectDataType.JSON.value
  50. OPENAPI = IndirectDataType.OPENAPI.value
  51. GMAIL = IndirectDataType.GMAIL.value
  52. POSTGRES = IndirectDataType.POSTGRES.value
  53. MYSQL = IndirectDataType.MYSQL.value
  54. SLACK = IndirectDataType.SLACK.value