Last security check
This commit is contained in:
+3
-2
@@ -131,12 +131,13 @@ function fociz_ai_chat_gemini(array $messages, array $options, array $aiSettings
|
||||
$payload['generationConfig']['responseMimeType'] = 'application/json';
|
||||
}
|
||||
|
||||
$endpoint = "https://generativelanguage.googleapis.com/v1beta/models/{$model}:generateContent?key=" . urlencode($apiKey);
|
||||
$endpoint = "https://generativelanguage.googleapis.com/v1beta/models/{$model}:generateContent";
|
||||
|
||||
$response = fociz_http_request($endpoint, [
|
||||
'method' => 'POST',
|
||||
'headers' => [
|
||||
'Content-Type' => 'application/json',
|
||||
'Content-Type' => 'application/json',
|
||||
'x-goog-api-key' => $apiKey,
|
||||
],
|
||||
'body' => $payload,
|
||||
'timeout' => 45,
|
||||
|
||||
Reference in New Issue
Block a user