This commit is contained in:
JzoNg 2024-09-18 18:06:46 +08:00
parent 4dbf56675a
commit f652ae0d98
2 changed files with 7 additions and 3 deletions

View File

@ -170,8 +170,9 @@ const FormItem: FC<Props> = ({
type === InputVarType.files && (
<TextGenerationImageUploader
settings={{
...fileSettings?.image,
detail: Resolution.high,
...fileSettings,
detail: fileSettings?.image?.detail || Resolution.high,
transfer_methods: fileSettings?.allowed_file_upload_methods || [],
} as any}
onFilesChange={files => onChange(files.filter(file => file.progress !== -1).map(fileItem => ({
type: 'image',

View File

@ -74,6 +74,8 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
const singleRunForms = (() => {
const forms: FormProps[] = []
console.log(data.vision?.configs)
if (varInputs.length > 0) {
forms.push(
{
@ -102,11 +104,12 @@ const Panel: FC<NodePanelProps<LLMNodeType>> = ({
}
if (isVisionModel) {
const variableName = data.vision.configs?.variable_selector[1]
forms.push(
{
label: t(`${i18nPrefix}.vision`)!,
inputs: [{
label: t(`${i18nPrefix}.files`)!,
label: variableName!,
variable: '#files#',
type: InputVarType.files,
required: false,