You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #
  2. # Copyright 2024 The InfiniFlow Authors. All Rights Reserved.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. #
  16. from enum import Enum
  17. from enum import IntEnum
  18. from strenum import StrEnum
  19. class StatusEnum(Enum):
  20. VALID = "1"
  21. INVALID = "0"
  22. class UserTenantRole(StrEnum):
  23. OWNER = 'owner'
  24. ADMIN = 'admin'
  25. NORMAL = 'normal'
  26. INVITE = 'invite'
  27. class TenantPermission(StrEnum):
  28. ME = 'me'
  29. TEAM = 'team'
  30. class SerializedType(IntEnum):
  31. PICKLE = 1
  32. JSON = 2
  33. class FileType(StrEnum):
  34. PDF = 'pdf'
  35. DOC = 'doc'
  36. VISUAL = 'visual'
  37. AURAL = 'aural'
  38. VIRTUAL = 'virtual'
  39. FOLDER = 'folder'
  40. OTHER = "other"
  41. class LLMType(StrEnum):
  42. CHAT = 'chat'
  43. EMBEDDING = 'embedding'
  44. SPEECH2TEXT = 'speech2text'
  45. IMAGE2TEXT = 'image2text'
  46. RERANK = 'rerank'
  47. TTS = 'tts'
  48. class ChatStyle(StrEnum):
  49. CREATIVE = 'Creative'
  50. PRECISE = 'Precise'
  51. EVENLY = 'Evenly'
  52. CUSTOM = 'Custom'
  53. class TaskStatus(StrEnum):
  54. UNSTART = "0"
  55. RUNNING = "1"
  56. CANCEL = "2"
  57. DONE = "3"
  58. FAIL = "4"
  59. class ParserType(StrEnum):
  60. PRESENTATION = "presentation"
  61. LAWS = "laws"
  62. MANUAL = "manual"
  63. PAPER = "paper"
  64. RESUME = "resume"
  65. BOOK = "book"
  66. QA = "qa"
  67. TABLE = "table"
  68. NAIVE = "naive"
  69. PICTURE = "picture"
  70. ONE = "one"
  71. AUDIO = "audio"
  72. EMAIL = "email"
  73. KG = "knowledge_graph"
  74. class FileSource(StrEnum):
  75. LOCAL = ""
  76. KNOWLEDGEBASE = "knowledgebase"
  77. S3 = "s3"
  78. class CanvasType(StrEnum):
  79. ChatBot = "chatbot"
  80. DocBot = "docbot"
  81. KNOWLEDGEBASE_FOLDER_NAME=".knowledgebase"