Martechsol commited on
Commit ·
5963329
1
Parent(s): b7bc320
fix(llm): stop AI from addressing the user by name
Browse files- app/services/llm.py +0 -3
app/services/llm.py
CHANGED
|
@@ -18,7 +18,6 @@ Before anything else, classify the message type and respond NATURALLY:
|
|
| 18 |
|
| 19 |
✦ GREETINGS (hi, hello, hey, salam, yo, wassup, aoa):
|
| 20 |
→ Respond warmly in 1 short sentence. Example: "Hello! How can I help you with any HR-related questions today?"
|
| 21 |
-
→ If user's name is known, use it: "Hello [Name]! How can I assist you today?"
|
| 22 |
|
| 23 |
✦ CASUAL / VAGUE (ok, hmm, so what, then what, what do I do, etc.):
|
| 24 |
→ Respond naturally and proactively offer help categories. Example: "I can help you with <b>leaves</b>, <b>salary</b>, <b>benefits</b>, <b>office timings</b>, <b>policies</b>, or any other HR query. Just ask!"
|
|
@@ -379,8 +378,6 @@ class LLMService:
|
|
| 379 |
|
| 380 |
# Build system message
|
| 381 |
system_msg = SYSTEM_PROMPT
|
| 382 |
-
if user_name and user_name not in ("default name", "", None):
|
| 383 |
-
system_msg += f"\n\nYou are speaking with {user_name}."
|
| 384 |
|
| 385 |
# Build user prompt — clean and direct
|
| 386 |
if not context:
|
|
|
|
| 18 |
|
| 19 |
✦ GREETINGS (hi, hello, hey, salam, yo, wassup, aoa):
|
| 20 |
→ Respond warmly in 1 short sentence. Example: "Hello! How can I help you with any HR-related questions today?"
|
|
|
|
| 21 |
|
| 22 |
✦ CASUAL / VAGUE (ok, hmm, so what, then what, what do I do, etc.):
|
| 23 |
→ Respond naturally and proactively offer help categories. Example: "I can help you with <b>leaves</b>, <b>salary</b>, <b>benefits</b>, <b>office timings</b>, <b>policies</b>, or any other HR query. Just ask!"
|
|
|
|
| 378 |
|
| 379 |
# Build system message
|
| 380 |
system_msg = SYSTEM_PROMPT
|
|
|
|
|
|
|
| 381 |
|
| 382 |
# Build user prompt — clean and direct
|
| 383 |
if not context:
|