Update: 2026-06-12 01:23:54
This commit is contained in:
@@ -46,7 +46,9 @@ if (!move_uploaded_file($file['tmp_name'], $uploadPath)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$imageUrl = "https://intaleq.xyz/siro/auth/uploads/documents/" . $uniqueName ;
|
||||
$host = $_SERVER['HTTP_HOST'] ?? 'api-syria.siromove.com';
|
||||
$protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') ? "https" : "http";
|
||||
$imageUrl = "$protocol://$host/siro/auth/uploads/documents/" . $uniqueName ;
|
||||
$imageData = file_get_contents($uploadPath);
|
||||
$imageBase64 = base64_encode($imageData);
|
||||
|
||||
@@ -196,7 +198,7 @@ EOT
|
||||
$prompt = $prompts[$type] ?? $prompts["id_front_sy"];
|
||||
|
||||
$apiKey = getenv("GEMINI_API_KEY");
|
||||
$apiURL = "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-lite:generateContent?key=$apiKey";
|
||||
$apiURL = "https://generativelanguage.googleapis.com/v1beta/models/gemini-flash-lite-latest:generateContent?key=$apiKey";
|
||||
|
||||
$headers = ["Content-Type: application/json"];
|
||||
$payload = [
|
||||
|
||||
Reference in New Issue
Block a user