Support variables in question classifier classes (#17227)

This commit is contained in:
Obada Khalili
2025-04-01 05:19:36 +02:00
committed by GitHub
parent 931d3390f0
commit 6372cb7b41
5 changed files with 46 additions and 37 deletions

View File

@@ -9,13 +9,14 @@ 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'
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 } = props
const { data, id } = props
const { provider, name: modelId } = data.model
// const tempTopics = data.topics
const topics = data.classes
@@ -47,7 +48,12 @@ const Node: FC<NodeProps<QuestionClassifierNodeType>> = (props) => {
>
<InfoPanel
title={`${t(`${i18nPrefix}.class`)} ${index + 1}`}
content={topic.name}
content={
<ReadonlyInputWithSelectVar
value={topic.name}
nodeId={id}
/>
}
/>
<NodeSourceHandle
{...props}