Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

use-configs-map.ts 726B

3 månader sedan
3 månader sedan
3 månader sedan
3 månader sedan
123456789101112131415161718192021222324
  1. import { useMemo } from 'react'
  2. import { useStore } from '@/app/components/workflow/store'
  3. import { FlowType } from '@/types/common'
  4. import { Resolution, TransferMethod } from '@/types/app'
  5. export const useConfigsMap = () => {
  6. const pipelineId = useStore(s => s.pipelineId)
  7. const fileUploadConfig = useStore(s => s.fileUploadConfig)
  8. return useMemo(() => {
  9. return {
  10. flowId: pipelineId!,
  11. flowType: FlowType.ragPipeline,
  12. fileSettings: {
  13. image: {
  14. enabled: false,
  15. detail: Resolution.high,
  16. number_limits: 3,
  17. transfer_methods: [TransferMethod.local_file, TransferMethod.remote_url],
  18. },
  19. fileUploadConfig,
  20. },
  21. }
  22. }, [pipelineId])
  23. }