From 000641c619a93daeaff22f22e4645a8c7770f947 Mon Sep 17 00:00:00 2001 From: Alex Torregrosa Date: Wed, 18 Dec 2024 19:26:54 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20Gemini=20system=20instruc?= =?UTF-8?q?tions=20not=20sent=20with=20null=20RAG=5FAPI=5FURL=20(#4920)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit System instructions were not being sent to gemini models when RAG_API_URL was not set, as the original promptPrefix was not being populated. --- api/app/clients/GoogleClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/app/clients/GoogleClient.js b/api/app/clients/GoogleClient.js index 15f2e6dc63..b7cc987e45 100644 --- a/api/app/clients/GoogleClient.js +++ b/api/app/clients/GoogleClient.js @@ -697,7 +697,7 @@ class GoogleClient extends BaseClient { promptPrefix = `${promptPrefix ?? ''}\n${this.options.artifactsPrompt}`.trim(); } - if (this.options?.promptPrefix?.length) { + if (promptPrefix.length) { requestOptions.systemInstruction = { parts: [ {