AI Analysis: simplify Gemini request to fix payload errors

This commit is contained in:
jeremy bayse
2026-03-25 18:04:29 +01:00
parent 0a82bf5017
commit 5a8d9b494b

View File

@@ -197,10 +197,7 @@ class AIAnalysisService
try {
$response = Http::timeout(60)->post("https://generativelanguage.googleapis.com/v1/models/gemini-1.5-flash:generateContent?key=" . $apiKey, [
'contents' => [['parts' => [['text' => $prompt]]]],
'generation_config' => [
'response_mime_type' => 'application/json'
]
'contents' => [['parts' => [['text' => $prompt]]]]
]);
if ($response->successful()) {