mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
MultiModal : Adding functionality to base OpenAI Chat Model
This commit is contained in:
@@ -474,7 +474,6 @@ export class App {
|
||||
const allowances: IUploadFileSizeAndTypes[] = []
|
||||
let allowSpeechToText = false
|
||||
let allowImageUploads = false
|
||||
let allowAudioUploads = false
|
||||
flowObj.nodes.forEach((node: IReactFlowNode) => {
|
||||
if (uploadAllowedCategoryNodes.indexOf(node.data.category) > -1) {
|
||||
logger.debug(`[server]: Found Eligible Node ${node.data.type}, Allowing Uploads.`)
|
||||
@@ -484,18 +483,11 @@ export class App {
|
||||
node.data.inputParams.map((param: INodeParams) => {
|
||||
if (param.name === 'allowImageUploads' && node.data.inputs?.['allowImageUploads'] && !allowImageUploads) {
|
||||
allowances.push({
|
||||
fileTypes: 'image/gif;image/jpeg;image/png;image/webp'.split(';'),
|
||||
fileTypes: 'image/gif;image/jpeg;image/png;image/webp;'.split(';'),
|
||||
maxUploadSize: 5
|
||||
})
|
||||
allowImageUploads = true
|
||||
}
|
||||
if (param.name === 'allowAudioUploads' && node.data.inputs?.['allowAudioUploads'] && !allowAudioUploads) {
|
||||
allowances.push({
|
||||
fileTypes: 'audio/mpeg;audio/x-wav;audio/mp4'.split(';'),
|
||||
maxUploadSize: 5
|
||||
})
|
||||
allowAudioUploads = true
|
||||
}
|
||||
if (param.name === 'allowSpeechToText' && node.data.inputs?.['allowSpeechToText']) {
|
||||
allowSpeechToText = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user