Reduce Gemini evaluation latency

This commit is contained in:
Wojtek
2026-10-16 22:46:35 +02:00
parent 686e927249
commit 42af47ea2e
4 changed files with 9 additions and 4 deletions
@@ -0,0 +1 @@
-- Wydanie 1.43.29: ograniczono czas generowania oceny przez Gemini.
@@ -74,7 +74,11 @@ class AiService
],
'gemini' => [
'contents' => [['parts' => [['text' => $input]]]],
'generationConfig' => ['responseMimeType' => 'application/json'],
'generationConfig' => [
'maxOutputTokens' => 256,
'responseMimeType' => 'application/json',
'thinkingConfig' => ['thinkingLevel' => 'low'],
],
],
default => [
'model' => $model,
@@ -100,7 +104,7 @@ class AiService
$config['url'],
$payload,
$headers,
60
$provider === 'gemini' ? 25 : 60
);
$body = json_decode((string) $response->body, true);