data_type.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. DISCOURSE = "discourse"
  30. SUBSTACK = "substack"
  31. GITHUB = "github"
  32. YOUTUBE_CHANNEL = "youtube_channel"
  33. class SpecialDataType(Enum):
  34. """
  35. SpecialDataType enum contains data types that are neither direct nor indirect, or simply require special attention.
  36. """
  37. QNA_PAIR = "qna_pair"
  38. class DataType(Enum):
  39. TEXT = DirectDataType.TEXT.value
  40. YOUTUBE_VIDEO = IndirectDataType.YOUTUBE_VIDEO.value
  41. PDF_FILE = IndirectDataType.PDF_FILE.value
  42. WEB_PAGE = IndirectDataType.WEB_PAGE.value
  43. SITEMAP = IndirectDataType.SITEMAP.value
  44. XML = IndirectDataType.XML.value
  45. DOCX = IndirectDataType.DOCX.value
  46. DOCS_SITE = IndirectDataType.DOCS_SITE.value
  47. NOTION = IndirectDataType.NOTION.value
  48. CSV = IndirectDataType.CSV.value
  49. MDX = IndirectDataType.MDX.value
  50. QNA_PAIR = SpecialDataType.QNA_PAIR.value
  51. IMAGES = IndirectDataType.IMAGES.value
  52. UNSTRUCTURED = IndirectDataType.UNSTRUCTURED.value
  53. JSON = IndirectDataType.JSON.value
  54. OPENAPI = IndirectDataType.OPENAPI.value
  55. GMAIL = IndirectDataType.GMAIL.value
  56. POSTGRES = IndirectDataType.POSTGRES.value
  57. MYSQL = IndirectDataType.MYSQL.value
  58. SLACK = IndirectDataType.SLACK.value
  59. DISCOURSE = IndirectDataType.DISCOURSE.value
  60. SUBSTACK = IndirectDataType.SUBSTACK.value
  61. GITHUB = IndirectDataType.GITHUB.value
  62. YOUTUBE_CHANNEL = IndirectDataType.YOUTUBE_CHANNEL.value