From ac519c3ff5b1a06bf61bcf463d4786dba073a4a4 Mon Sep 17 00:00:00 2001 From: Mic Date: Mon, 8 Sep 2025 22:09:00 +0200 Subject: [PATCH] trim fixed --- js/api/google_gemini.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/api/google_gemini.js b/js/api/google_gemini.js index c8145029..f2e2eb67 100644 --- a/js/api/google_gemini.js +++ b/js/api/google_gemini.js @@ -37,7 +37,7 @@ export class GoogleGemini { this.model = model; this.system_instruction = system_instruction; this.stream = stream; - this.thinking_budget = thinking_budget.trim(); + this.thinking_budget = String(thinking_budget ?? '').trim(); /* Info from: https://ai.google.dev/gemini-api/docs/thinking?#set-budget # Turn on thinking with a specific token limit: "thinking_budget": 1024 # Thinking off: "thinking_budget": 0