mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
Feature/Add ability to upload image url when calling API (#2683)
add ability to upload image url when calling API
This commit is contained in:
@@ -20,6 +20,14 @@ export const addImagesToMessages = async (
|
||||
// as the image is stored in the server, read the file and convert it to base64
|
||||
bf = 'data:' + upload.mime + ';base64,' + contents.toString('base64')
|
||||
|
||||
imageContent.push({
|
||||
type: 'image_url',
|
||||
image_url: {
|
||||
url: bf,
|
||||
detail: multiModalOption.image.imageResolution ?? 'low'
|
||||
}
|
||||
})
|
||||
} else if (upload.type == 'url' && bf) {
|
||||
imageContent.push({
|
||||
type: 'image_url',
|
||||
image_url: {
|
||||
|
||||
Reference in New Issue
Block a user