import type { FC } from 'react' import React from 'react' import type { NodeProps } from '@/app/components/workflow/types' import ModelSelector from '@/app/components/header/account-setting/model-provider-page/model-selector' import { useTextGenerationCurrentProviderAndModelAndModelList } from '@/app/components/header/account-setting/model-provider-page/hooks' import type { JudgingLLMNodeType } from './types' const Node: FC> = ({ data }) => { const { judge_model, pass_threshold } = data const hasSetModel = !!(judge_model?.provider && judge_model?.name) const { textGenerationModelList } = useTextGenerationCurrentProviderAndModelAndModelList() if (!hasSetModel) return null return (
Pass ≥ {pass_threshold ?? 7}
) } export default React.memo(Node)