Преглед на файлове

fix(web): number type prompt variable required validation not effective (#20898)

tags/1.5.0
yangzheli преди 4 месеца
родител
ревизия
b69f952e3e
No account linked to committer's email address
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1
    2
      web/app/components/app/configuration/debug/index.tsx

+ 1
- 2
web/app/components/app/configuration/debug/index.tsx Целия файл

@@ -156,12 +156,11 @@ const Debug: FC<IDebug> = ({
}
let hasEmptyInput = ''
const requiredVars = modelConfig.configs.prompt_variables.filter(({ key, name, required, type }) => {
if (type !== 'string' && type !== 'paragraph' && type !== 'select')
if (type !== 'string' && type !== 'paragraph' && type !== 'select' && type !== 'number')
return false
const res = (!key || !key.trim()) || (!name || !name.trim()) || (required || required === undefined || required === null)
return res
}) // compatible with old version
// debugger
requiredVars.forEach(({ key, name }) => {
if (hasEmptyInput)
return

Loading…
Отказ
Запис