fix: gemini multimodal text

This commit is contained in:
donmarble
2025-01-07 23:45:01 +09:00
committed by GitHub
parent 64b9b89220
commit 2d11b05e6c

View File

@@ -1555,9 +1555,17 @@ async function requestGoogleCloudVertex(arg:RequestDataArgumentExtended):Promise
parts: geminiParts, parts: geminiParts,
}); });
} else if (prevChat?.role === qRole) { } else if (prevChat?.role === qRole) {
reformatedChat[reformatedChat.length-1].parts[ if (reformatedChat[reformatedChat.length-1].parts[
reformatedChat[reformatedChat.length-1].parts.length-1 reformatedChat[reformatedChat.length-1].parts.length-1
].text += '\n' + chat.content ].inlineData) {
reformatedChat[reformatedChat.length-1].parts.push({
text: chat.content,
})
} else {
reformatedChat[reformatedChat.length-1].parts[
reformatedChat[reformatedChat.length-1].parts.length-1
].text += '\n' + chat.content
}
continue continue
} }
else if(chat.role === 'system'){ else if(chat.role === 'system'){