Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

990 B
Raw Blame
import type { FC } from 'react'
import type { ParameterExtractorNodeType } from './types'
import type { NodeProps } from '@/app/components/workflow/types'
import * as React from 'react'
import { useTextGenerationCurrentProviderAndModelAndModelList } from '@/app/components/header/account-setting/model-provider-page/hooks'
import { ModelSelector } from '@/app/components/header/account-setting/model-provider-page/model-selector'

const Node: FC<NodeProps<ParameterExtractorNodeType>> = ({ data }) => {
  const { provider, name: modelId } = data.model || {}
  const { textGenerationModelList } = useTextGenerationCurrentProviderAndModelAndModelList()
  const hasSetModel = provider && modelId
  return (
    <div className="mb-1 px-3 py-1">
      {hasSetModel && (
        <ModelSelector
          value={{ provider, model: modelId }}
          models={textGenerationModelList}
          size="small"
          disabled
        />
      )}
    </div>
  )
}

export default React.memo(Node)