From 2b794690d870a46039f720fcf947b199941327a3 Mon Sep 17 00:00:00 2001 From: Mic Date: Mon, 8 Sep 2025 22:00:00 +0200 Subject: [PATCH] thinkingBudget renamed to thinking_budget. see #494 --- js/api/google_gemini.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/js/api/google_gemini.js b/js/api/google_gemini.js index 5dad89e0..c8145029 100644 --- a/js/api/google_gemini.js +++ b/js/api/google_gemini.js @@ -24,25 +24,25 @@ export class GoogleGemini { model = ''; system_instruction = ''; stream = false; - thinkingBudget = ''; // Model default + thinking_budget = ''; // Model default constructor({ apiKey = '', model = '', system_instruction = '', stream = false, - thinkingBudget = '', + thinking_budget = '', } = {}) { this.apiKey = apiKey; this.model = model; this.system_instruction = system_instruction; this.stream = stream; - this.thinkingBudget = thinkingBudget.trim(); + this.thinking_budget = thinking_budget.trim(); /* Info from: https://ai.google.dev/gemini-api/docs/thinking?#set-budget - # Turn on thinking with a specific token limit: "thinkingBudget": 1024 - # Thinking off: "thinkingBudget": 0 - # Turn on dynamic thinking: "thinkingBudget": -1 - # Keep model default thinking: "thinkingBudget": "" + # Turn on thinking with a specific token limit: "thinking_budget": 1024 + # Thinking off: "thinking_budget": 0 + # Turn on dynamic thinking: "thinking_budget": -1 + # Keep model default thinking: "thinking_budget": "" */ } @@ -100,10 +100,10 @@ export class GoogleGemini { }; } - if(this.thinkingBudget !== '') { + if(this.thinking_budget !== '') { google_gemini_body.generationConfig = { thinkingConfig: { - thinkingBudget: this.thinkingBudget, + thinking_budget: this.thinking_budget, } }; }