diff --git a/app/Http/Livewire/Chat/ShowConfiguracionChat.php b/app/Http/Livewire/Chat/ShowConfiguracionChat.php index a311144..50fb618 100755 --- a/app/Http/Livewire/Chat/ShowConfiguracionChat.php +++ b/app/Http/Livewire/Chat/ShowConfiguracionChat.php @@ -112,10 +112,6 @@ class ShowConfiguracionChat extends Component 'contents' => [['parts' => [['text' => 'Responde solo "ok"']]]], 'generationConfig' => ['maxOutputTokens' => 5, 'temperature' => 0], ]; - if (preg_match('/gemini-(2\.5|3[\.\d]*)/', $model)) { - $body['thinkingConfig'] = ['thinkingBudget' => 0]; - } - $response = Http::timeout(15) ->withHeaders(['Content-Type' => 'application/json']) ->post("{$url}?key={$key}", $body); diff --git a/app/Services/GeminiIntentService.php b/app/Services/GeminiIntentService.php index 018c4c3..11b7d3f 100644 --- a/app/Services/GeminiIntentService.php +++ b/app/Services/GeminiIntentService.php @@ -25,15 +25,10 @@ class GeminiIntentService private function buildRequest(array $contents, array $genConfig = []): array { - $body = [ + return [ 'contents' => $contents, 'generationConfig' => array_merge(['temperature' => 0.1, 'maxOutputTokens' => 100], $genConfig), ]; - // thinkingConfig goes at root level (NOT inside generationConfig) for 2.5+ models - if (preg_match('/gemini-(2\.5|3[\.\d]*)/', $this->model)) { - $body['thinkingConfig'] = ['thinkingBudget' => 0]; - } - return $body; } /** diff --git a/app/Services/GeminiVisionService.php b/app/Services/GeminiVisionService.php index a8af1fe..c7cdaf0 100644 --- a/app/Services/GeminiVisionService.php +++ b/app/Services/GeminiVisionService.php @@ -24,14 +24,10 @@ class GeminiVisionService private function buildRequest(array $contents, array $genConfig = []): array { - $body = [ + return [ 'contents' => $contents, 'generationConfig' => array_merge(['temperature' => 0.1, 'maxOutputTokens' => 200], $genConfig), ]; - if (preg_match('/gemini-(2\.5|3[\.\d]*)/', $this->model)) { - $body['thinkingConfig'] = ['thinkingBudget' => 0]; - } - return $body; } /**