AI Analysis: simplify Gemini request to fix payload errors
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user