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.

knowledge.ts 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. export enum KnowledgeRouteKey {
  2. Dataset = 'dataset',
  3. Testing = 'testing',
  4. Configuration = 'configuration',
  5. KnowledgeGraph = 'knowledgeGraph',
  6. }
  7. export const DatasetBaseKey = 'dataset';
  8. export enum RunningStatus {
  9. UNSTART = '0', // need to run
  10. RUNNING = '1', // need to cancel
  11. CANCEL = '2', // need to refresh
  12. DONE = '3', // need to refresh
  13. FAIL = '4', // need to refresh
  14. }
  15. export enum ModelVariableType {
  16. Improvise = 'Improvise',
  17. Precise = 'Precise',
  18. Balance = 'Balance',
  19. }
  20. export const settledModelVariableMap = {
  21. [ModelVariableType.Improvise]: {
  22. temperature: 0.8,
  23. top_p: 0.9,
  24. frequency_penalty: 0.1,
  25. presence_penalty: 0.1,
  26. max_tokens: 4096,
  27. },
  28. [ModelVariableType.Precise]: {
  29. temperature: 0.2,
  30. top_p: 0.75,
  31. frequency_penalty: 0.5,
  32. presence_penalty: 0.5,
  33. max_tokens: 4096,
  34. },
  35. [ModelVariableType.Balance]: {
  36. temperature: 0.5,
  37. top_p: 0.85,
  38. frequency_penalty: 0.3,
  39. presence_penalty: 0.2,
  40. max_tokens: 4096,
  41. },
  42. };
  43. export enum LlmModelType {
  44. Embedding = 'embedding',
  45. Chat = 'chat',
  46. Image2text = 'image2text',
  47. Speech2text = 'speech2text',
  48. Rerank = 'rerank',
  49. TTS = 'tts',
  50. }
  51. export enum KnowledgeSearchParams {
  52. DocumentId = 'doc_id',
  53. KnowledgeId = 'id',
  54. }
  55. export enum DocumentType {
  56. Virtual = 'virtual',
  57. Visual = 'visual',
  58. }
  59. export enum DocumentParserType {
  60. Naive = 'naive',
  61. Qa = 'qa',
  62. Resume = 'resume',
  63. Manual = 'manual',
  64. Table = 'table',
  65. Paper = 'paper',
  66. Book = 'book',
  67. Laws = 'laws',
  68. Presentation = 'presentation',
  69. Picture = 'picture',
  70. One = 'one',
  71. Audio = 'audio',
  72. Email = 'email',
  73. Tag = 'tag',
  74. KnowledgeGraph = 'knowledge_graph',
  75. }