AI Analysis: switch Gemini to v1 stable API

This commit is contained in:
jeremy bayse
2026-03-25 07:53:40 +01:00
parent 78245f2bee
commit bee5215a5b

View File

@@ -196,7 +196,7 @@ class AIAnalysisService
if (!$apiKey) return $this->getSimulatedAnalysis(); if (!$apiKey) return $this->getSimulatedAnalysis();
try { try {
$response = Http::timeout(60)->post("https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key=" . $apiKey, [ $response = Http::timeout(60)->post("https://generativelanguage.googleapis.com/v1/models/gemini-1.5-flash:generateContent?key=" . $apiKey, [
'contents' => [['parts' => [['text' => $prompt]]]], 'contents' => [['parts' => [['text' => $prompt]]]],
'generationConfig' => [ 'generationConfig' => [
'responseMimeType' => 'application/json' 'responseMimeType' => 'application/json'