trim fixed

This commit is contained in:
Mic 2025-09-08 22:09:00 +02:00
parent 59758a76c0
commit ac519c3ff5

View file

@ -37,7 +37,7 @@ export class GoogleGemini {
this.model = model; this.model = model;
this.system_instruction = system_instruction; this.system_instruction = system_instruction;
this.stream = stream; 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 /* Info from: https://ai.google.dev/gemini-api/docs/thinking?#set-budget
# Turn on thinking with a specific token limit: "thinking_budget": 1024 # Turn on thinking with a specific token limit: "thinking_budget": 1024
# Thinking off: "thinking_budget": 0 # Thinking off: "thinking_budget": 0