From 0fc406a945bb018441d39fd00662f0cda195c925 Mon Sep 17 00:00:00 2001 From: Sunner Sun Date: Mon, 4 Mar 2024 20:21:14 +0800 Subject: [PATCH] fix: Gemini always create new chat --- src/bots/google/BardBot.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bots/google/BardBot.js b/src/bots/google/BardBot.js index 0f3ed3ab26..57ac5014cc 100644 --- a/src/bots/google/BardBot.js +++ b/src/bots/google/BardBot.js @@ -29,13 +29,13 @@ function parseResponse(resp) { return { text, ids }; } -function generateReq(model, prompt) { +function generateReq(model, prompt, contextIds) { let modelNumber = model == "gemini-ultra" ? 2 : 1; // The JSON is ugly and meaningless, but it works let innerJSON = [ [prompt, 0, null, null, null, null, 0], ["en"], - ["", "", ""], + contextIds, "", "", null,