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 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. class LLMType(StrEnum):
  39. CHAT = 'chat'
  40. EMBEDDING = 'embedding'
  41. SPEECH2TEXT = 'speech2text'
  42. IMAGE2TEXT = 'image2text'
  43. class ChatStyle(StrEnum):
  44. CREATIVE = 'Creative'
  45. PRECISE = 'Precise'
  46. EVENLY = 'Evenly'
  47. CUSTOM = 'Custom'
  48. class TaskStatus(StrEnum):
  49. RUNNING = "1"
  50. CANCEL = "2"
  51. DONE = "3"
  52. FAIL = "4"
  53. class ParserType(StrEnum):
  54. GENERAL = "general"
  55. PRESENTATION = "presentation"
  56. LAWS = "laws"
  57. MANUAL = "manual"
  58. PAPER = "paper"
  59. RESUME = "resume"
  60. BOOK = "book"
  61. QA = "qa"
  62. TABLE = "table"