diff --git a/src/ts/process/request.ts b/src/ts/process/request.ts index b4ca7ea3..3a051961 100644 --- a/src/ts/process/request.ts +++ b/src/ts/process/request.ts @@ -1555,9 +1555,17 @@ async function requestGoogleCloudVertex(arg:RequestDataArgumentExtended):Promise parts: geminiParts, }); } else if (prevChat?.role === qRole) { - reformatedChat[reformatedChat.length-1].parts[ + if (reformatedChat[reformatedChat.length-1].parts[ 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 } else if(chat.role === 'system'){ @@ -2841,4 +2849,4 @@ export interface KoboldGenerationInputSchema extends KoboldSamplerSettingsSchema sampler_order?: number[]; sampler_seed?: number; sampler_full_determinism?: boolean; -} \ No newline at end of file +}