fix(aiCore): update file data and mediaType extraction in convertFileBlockToFilePart function
- Modified the conversion logic to correctly extract base64 data and MIME type from the API response. - Ensured that the filename remains unchanged during the conversion process.
This commit is contained in:
@@ -275,8 +275,8 @@ async function convertFileBlockToFilePart(fileBlock: FileMessageBlock, model: Mo
|
||||
const base64Data = await window.api.file.base64File(file.id + file.ext)
|
||||
return {
|
||||
type: 'file',
|
||||
data: base64Data,
|
||||
mediaType: 'application/pdf',
|
||||
data: base64Data.data,
|
||||
mediaType: base64Data.mime,
|
||||
filename: file.origin_name
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user