AI Analysis: fix Gemini payload formatting (use snake_case)
This commit is contained in:
@@ -198,8 +198,8 @@ class AIAnalysisService
|
|||||||
try {
|
try {
|
||||||
$response = Http::timeout(60)->post("https://generativelanguage.googleapis.com/v1/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' => [
|
'generation_config' => [
|
||||||
'responseMimeType' => 'application/json'
|
'response_mime_type' => 'application/json'
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user