Auto-deploy: 2026-05-17 01:59:57
This commit is contained in:
@@ -112,10 +112,15 @@ Job Description:
|
||||
$dompdf->render();
|
||||
|
||||
$pdfOutput = $dompdf->output();
|
||||
$rawJobTitle = $data['jobTitle'] ?? 'Job';
|
||||
$safeJobTitle = preg_replace('/[^a-zA-Z0-9\-_]/', '_', $rawJobTitle);
|
||||
$safeJobTitle = trim($safeJobTitle, '_');
|
||||
$fileName = "Hamza_Ayed - {$safeJobTitle}.pdf";
|
||||
|
||||
echo json_encode([
|
||||
"success" => true,
|
||||
"pdf" => base64_encode($pdfOutput),
|
||||
"filename" => "Tailored_CV.pdf"
|
||||
"filename" => $fileName
|
||||
]);
|
||||
} catch (Exception $e) {
|
||||
http_response_code(500);
|
||||
@@ -132,7 +137,7 @@ if ($action === 'generateText') {
|
||||
|
||||
$payload = json_encode([
|
||||
"contents" => [["parts" => [["text" => $prompt]]]],
|
||||
"generationConfig" => ["temperature" => 0.7, "maxOutputTokens" => 2048]
|
||||
"generationConfig" => ["temperature" => 0.7, "maxOutputTokens" => 8192]
|
||||
]);
|
||||
|
||||
$ch = curl_init($geminiUrl);
|
||||
|
||||
Reference in New Issue
Block a user