您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

__init__.py 2.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. class TenantPermission(StrEnum):
  27. ME = 'me'
  28. TEAM = 'team'
  29. class SerializedType(IntEnum):
  30. PICKLE = 1
  31. JSON = 2
  32. class FileType(StrEnum):
  33. PDF = 'pdf'
  34. DOC = 'doc'
  35. VISUAL = 'visual'
  36. AURAL = 'aural'
  37. VIRTUAL = 'virtual'
  38. FOLDER = 'folder'
  39. OTHER = "other"
  40. class LLMType(StrEnum):
  41. CHAT = 'chat'
  42. EMBEDDING = 'embedding'
  43. SPEECH2TEXT = 'speech2text'
  44. IMAGE2TEXT = 'image2text'
  45. RERANK = 'rerank'
  46. TTS = 'tts'
  47. class ChatStyle(StrEnum):
  48. CREATIVE = 'Creative'
  49. PRECISE = 'Precise'
  50. EVENLY = 'Evenly'
  51. CUSTOM = 'Custom'
  52. class TaskStatus(StrEnum):
  53. UNSTART = "0"
  54. RUNNING = "1"
  55. CANCEL = "2"
  56. DONE = "3"
  57. FAIL = "4"
  58. class ParserType(StrEnum):
  59. PRESENTATION = "presentation"
  60. LAWS = "laws"
  61. MANUAL = "manual"
  62. PAPER = "paper"
  63. RESUME = "resume"
  64. BOOK = "book"
  65. QA = "qa"
  66. TABLE = "table"
  67. NAIVE = "naive"
  68. PICTURE = "picture"
  69. ONE = "one"
  70. AUDIO = "audio"
  71. EMAIL = "email"
  72. KG = "knowledge_graph"
  73. class FileSource(StrEnum):
  74. LOCAL = ""
  75. KNOWLEDGEBASE = "knowledgebase"
  76. S3 = "s3"
  77. class CanvasType(StrEnum):
  78. ChatBot = "chatbot"
  79. DocBot = "docbot"
  80. KNOWLEDGEBASE_FOLDER_NAME=".knowledgebase"