| | |
| | | useTextGenerationCurrentProviderAndModelAndModelList, |
| | | } from '@/app/components/header/account-setting/model-provider-page/hooks' |
| | | import ModelSelector from '@/app/components/header/account-setting/model-provider-page/model-selector' |
| | | import ReadonlyInputWithSelectVar from '../_base/components/readonly-input-with-select-var' |
| | | |
| | | const i18nPrefix = 'workflow.nodes.questionClassifiers' |
| | | |
| | | const Node: FC<NodeProps<QuestionClassifierNodeType>> = (props) => { |
| | | const { t } = useTranslation() |
| | | |
| | | const { data, id } = props |
| | | const { data } = props |
| | | const { provider, name: modelId } = data.model |
| | | // const tempTopics = data.topics |
| | | const topics = data.classes |
| | |
| | | {hasSetModel && ( |
| | | <ModelSelector |
| | | defaultModel={{ provider, model: modelId }} |
| | | triggerClassName='!h-6 !rounded-md' |
| | | modelList={textGenerationModelList} |
| | | readonly |
| | | /> |
| | |
| | | > |
| | | <InfoPanel |
| | | title={`${t(`${i18nPrefix}.class`)} ${index + 1}`} |
| | | content={ |
| | | <ReadonlyInputWithSelectVar |
| | | value={topic.name} |
| | | nodeId={id} |
| | | /> |
| | | } |
| | | content={topic.name} |
| | | /> |
| | | <NodeSourceHandle |
| | | {...props} |