Deploy: 2026-05-22 00:54:36

This commit is contained in:
Hamza-Ayed
2026-05-22 00:54:36 +03:00
parent 31da995e88
commit 2ea36c98cd
5 changed files with 287 additions and 2 deletions

View File

@@ -314,6 +314,9 @@ class WhatsAppController extends BaseController
}
$systemPrompt = $rule['ai_prompt'] ?: 'You are a helpful customer support assistant.';
// Enforce language matching rule dynamically
$systemPrompt .= "\n\nIMPORTANT LANGUAGE RULE: Detect the language of the incoming message. If the incoming message is in English, you MUST reply in English. If the incoming message is in Arabic, you MUST reply in Arabic. Override any default language instruction to match the user's language.";
$replyText = \App\Services\GeminiService::generateResponse($apiKey, $systemPrompt, $incomingText);
}