🐛 fix: Gemini system instructions not sent with null RAG_API_URL (#4920)

System instructions were not being sent to gemini models when RAG_API_URL was not set, as the original promptPrefix was not being populated.
This commit is contained in:
Alex Torregrosa 2024-12-18 19:26:54 +01:00 committed by GitHub
parent 3ceb227507
commit 000641c619
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: [
{