fix(gemini): deshabilitar thinking y subir maxOutputTokens a 8192/2048
Con thinkingBudget=0 el modelo no consume tokens en razonamiento interno,
evitando que el JSON de respuesta quede truncado (bug: '{"banco":"Nu",...').
maxOutputTokens 2048→8192 en Vision, 1024→2048 en Intent.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
31ba26ee33
commit
5e20155ae4
@@ -27,7 +27,11 @@ class GeminiIntentService
|
||||
{
|
||||
return [
|
||||
'contents' => $contents,
|
||||
'generationConfig' => array_merge(['temperature' => 0.1, 'maxOutputTokens' => 1024], $genConfig),
|
||||
'generationConfig' => array_merge([
|
||||
'temperature' => 0.1,
|
||||
'maxOutputTokens' => 2048,
|
||||
'thinkingConfig' => ['thinkingBudget' => 0],
|
||||
], $genConfig),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,11 @@ class GeminiVisionService
|
||||
|
||||
$body = [
|
||||
'contents' => $contents,
|
||||
'generationConfig' => ['temperature' => 0.1, 'maxOutputTokens' => 2048],
|
||||
'generationConfig' => [
|
||||
'temperature' => 0.1,
|
||||
'maxOutputTokens' => 8192,
|
||||
'thinkingConfig' => ['thinkingBudget' => 0],
|
||||
],
|
||||
];
|
||||
|
||||
$inicio = microtime(true);
|
||||
|
||||
Reference in New Issue
Block a user