Update Banyak

This commit is contained in:
WD - Dev
2025-09-21 21:40:17 +07:00
parent c6bee729c5
commit efca8f5f80
145 changed files with 195185 additions and 1378 deletions
+7
View File
@@ -227,6 +227,13 @@ class ResponAI {
'temperature' => 0.7,
'max_tokens' => 100
];
// Simpan log payload ke file
$logFile = __DIR__ . '/api_request.log';
$logData = "=== " . date('Y-m-d H:i:s') . " ===\n";
$logData .= "Nomor: $sender\n";
$logData .= "Payload:\n" . json_encode($payload, JSON_PRETTY_PRINT) . "\n\n";
file_put_contents($logFile, $logData, FILE_APPEND);
$ch = curl_init('https://api.openai.com/v1/chat/completions');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);