-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Directly create app with flow can not use image upload function #3248
Comments
Based on your description, it seems like the issue might be related to how the The const onlyUploadLocal
= settings.transfer_methods.length === 1
&& settings.transfer_methods[0] === TransferMethod.local_file
if (onlyUploadLocal) {
return (
<UploadOnlyFromLocal
onUpload={onUpload}
disabled={disabled}
limit={+settings.image_file_size_limit!}
/>
)
}
return (
<UploaderButton
methods={settings.transfer_methods}
onUpload={onUpload}
disabled={disabled}
limit={+settings.image_file_size_limit!}
/>
) The issue might arise if the To resolve this issue, ensure that the You can find more details about this in the ChatImageUploader component in the Dify repository. The type ChatImageUploaderProps = {
settings: VisionSettings
onUpload: (imageFile: ImageFile) => void
disabled?: boolean
} In the const ChatImageUploader: FC<ChatImageUploaderProps> = ({
settings,
onUpload,
disabled,
}) => {
// Logic to determine if only local upload is allowed
const onlyUploadLocal
= settings.transfer_methods.length === 1
&& settings.transfer_methods[0] === TransferMethod.local_file
// Conditional rendering based on the settings
if (onlyUploadLocal) {
return (
<UploadOnlyFromLocal
onUpload={onUpload}
disabled={disabled}
limit={+settings.image_file_size_limit!}
/>
)
}
return (
<UploaderButton
methods={settings.transfer_methods}
onUpload={onUpload}
disabled={disabled}
limit={+settings.image_file_size_limit!}
/>
)
} This demonstrates how the The
Example of initializing a const visionSettings: VisionSettings = {
enabled: true,
number_limits: 5,
detail: Resolution.high,
transfer_methods: [TransferMethod.local_file, TransferMethod.remote_url],
image_file_size_limit: "10MB" // This can also be a number, depending on the requirements
}; You can find more details about this in the app.ts file in the Dify repository. I hope this helps! If you have any other questions or need further clarification, feel free to ask. Sources
|
Fixed with #3225 |
Self Checks
Dify version
0.6.0-fix
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
showed as above image, the llm just not get any image , and the app was created directly with chatflow
But if i create a basic app and convert to chatflow, the image upload function can be used and the llm can read the image
✔️ Expected Behavior
No response
❌ Actual Behavior
No response
The text was updated successfully, but these errors were encountered: