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.

__init__.py 2.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. class ChatStyle(StrEnum):
  47. CREATIVE = 'Creative'
  48. PRECISE = 'Precise'
  49. EVENLY = 'Evenly'
  50. CUSTOM = 'Custom'
  51. class TaskStatus(StrEnum):
  52. UNSTART = "0"
  53. RUNNING = "1"
  54. CANCEL = "2"
  55. DONE = "3"
  56. FAIL = "4"
  57. class ParserType(StrEnum):
  58. PRESENTATION = "presentation"
  59. LAWS = "laws"
  60. MANUAL = "manual"
  61. PAPER = "paper"
  62. RESUME = "resume"
  63. BOOK = "book"
  64. QA = "qa"
  65. TABLE = "table"
  66. NAIVE = "naive"
  67. PICTURE = "picture"
  68. ONE = "one"
  69. AUDIO = "audio"
  70. KG = "knowledge_graph"
  71. class FileSource(StrEnum):
  72. LOCAL = ""
  73. KNOWLEDGEBASE = "knowledgebase"
  74. S3 = "s3"
  75. class CanvasType(StrEnum):
  76. ChatBot = "chatbot"
  77. DocBot = "docbot"
  78. KNOWLEDGEBASE_FOLDER_NAME=".knowledgebase"