fix: not support num input
This commit is contained in:
parent
ef15747e4a
commit
b7f703852e
2 changed files with 22 additions and 0 deletions
|
|
@ -24,8 +24,12 @@ export const userInputsFormToPromptVariables = (useInputs: UserInputFormItem[] |
|
|||
if (item['text-input'])
|
||||
return ['string', item['text-input']]
|
||||
|
||||
if (item.number)
|
||||
return ['number', item.number]
|
||||
|
||||
return ['select', item.select]
|
||||
})()
|
||||
|
||||
if (type === 'string' || type === 'paragraph') {
|
||||
promptVariables.push({
|
||||
key: content.variable,
|
||||
|
|
@ -36,6 +40,15 @@ export const userInputsFormToPromptVariables = (useInputs: UserInputFormItem[] |
|
|||
options: [],
|
||||
})
|
||||
}
|
||||
else if (type === 'number') {
|
||||
promptVariables.push({
|
||||
key: content.variable,
|
||||
name: content.label,
|
||||
required: content.required,
|
||||
type,
|
||||
options: [],
|
||||
})
|
||||
}
|
||||
else {
|
||||
promptVariables.push({
|
||||
key: content.variable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue