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.

pipeline.ts 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. import type { InputVar, InputVarType } from '@/app/components/workflow/types'
  2. import type { DSLImportMode, DSLImportStatus } from './app'
  3. import type { ChunkingMode, DatasetPermission, IconInfo } from './datasets'
  4. import type { Dependency } from '@/app/components/plugins/types'
  5. import type { AppIconSelection } from '@/app/components/base/app-icon-picker'
  6. export type PipelineTemplateListParams = {
  7. type: 'built-in' | 'customized'
  8. }
  9. export type PipelineTemplate = {
  10. id: string
  11. name: string
  12. icon_info: IconInfo
  13. description: string
  14. position: number
  15. doc_form: ChunkingMode
  16. }
  17. export type PipelineTemplateListResponse = {
  18. pipelines: PipelineTemplate[]
  19. }
  20. export type PipelineTemplateByIdResponse = {
  21. name: string
  22. icon_info: IconInfo
  23. description: string
  24. author: string // todo: TBD
  25. structure: string // todo: TBD
  26. export_data: string
  27. }
  28. export type CreateFormData = {
  29. name: string
  30. appIcon: AppIconSelection
  31. description: string
  32. permission: DatasetPermission
  33. selectedMemberIDs: string[]
  34. }
  35. export type UpdatePipelineInfoRequest = {
  36. pipeline_id: string
  37. name: string
  38. icon_info: IconInfo
  39. description: string
  40. }
  41. export type UpdatePipelineInfoResponse = {
  42. pipeline_id: string
  43. name: string
  44. icon_info: IconInfo
  45. description: string
  46. position: number
  47. }
  48. export type DeletePipelineResponse = {
  49. code: number
  50. }
  51. export type ExportPipelineDSLRequest = {
  52. pipeline_id: string
  53. include_secret?: boolean
  54. }
  55. export type ExportPipelineDSLResponse = {
  56. data: string
  57. }
  58. export type ImportPipelineDSLRequest = {
  59. mode: DSLImportMode
  60. yaml_content?: string
  61. yaml_url?: string
  62. pipeline_id?: string
  63. }
  64. export type ImportPipelineDSLResponse = {
  65. id: string
  66. status: DSLImportStatus
  67. pipeline_id: string
  68. dataset_id: string
  69. current_dsl_version: string
  70. imported_dsl_version: string
  71. }
  72. export type ImportPipelineDSLConfirmResponse = {
  73. status: DSLImportStatus
  74. pipeline_id: string
  75. dataset_id: string
  76. current_dsl_version: string
  77. imported_dsl_version: string
  78. error: string
  79. }
  80. export type PipelineCheckDependenciesResponse = {
  81. leaked_dependencies: Dependency[]
  82. }
  83. export type Variables = {
  84. type: InputVarType
  85. label: string
  86. description: string
  87. variable: string
  88. max_length: number
  89. required: boolean
  90. options?: string[]
  91. default: string | number | boolean
  92. }
  93. export type PipelineProcessingParamsResponse = {
  94. variables: Variables[]
  95. }
  96. export type RAGPipelineVariable = InputVar
  97. export type RAGPipelineVariables = Array<{
  98. nodeId: string
  99. variables: RAGPipelineVariable[]
  100. }>