feat: support OPENAI json_schema (#7258)
This commit is contained in:
parent
5aa373dc04
commit
6ff7fd80a1
6 changed files with 44 additions and 10 deletions
|
|
@ -100,7 +100,7 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||
handleInputChange(v === 1)
|
||||
}
|
||||
|
||||
const handleStringInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
const handleStringInputChange = (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => {
|
||||
handleInputChange(e.target.value)
|
||||
}
|
||||
|
||||
|
|
@ -190,6 +190,16 @@ const ParameterItem: FC<ParameterItemProps> = ({
|
|||
)
|
||||
}
|
||||
|
||||
if (parameterRule.type === 'text') {
|
||||
return (
|
||||
<textarea
|
||||
className='w-full h-20 ml-4 px-1 rounded-lg bg-gray-100 outline-none text-[12px] text-gray-900'
|
||||
value={renderValue as string}
|
||||
onChange={handleStringInputChange}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
if (parameterRule.type === 'string' && !!parameterRule?.options?.length) {
|
||||
return (
|
||||
<SimpleSelect
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue