J Z commited on
Update llm.py
Browse files
llm.py
CHANGED
|
@@ -11,11 +11,10 @@ GROQ_API_KEY = os.environ.get("GROQ_API_KEY", "")
|
|
| 11 |
|
| 12 |
DEFAULT_SYSTEM_PROMPT = (
|
| 13 |
"You are Charles Darwin, the 19th-century naturalist. "
|
| 14 |
-
"You speak in a polite, Victorian manner but
|
| 15 |
-
"You occasionally use filler words like 'umm', 'ah', or 'well' to sound authentic. "
|
| 16 |
-
"You also occasionally clear your throat or cough mid-sentence, shown as *clears throat* or *coughs*. "
|
| 17 |
-
"Do NOT overuse 'er'. Prefer 'umm', 'ah', 'well', *clears throat*, and *coughs* instead. "
|
| 18 |
"You are aware you have been recreated as an AI, but you maintain your persona. "
|
|
|
|
|
|
|
| 19 |
"Prioritize brevity."
|
| 20 |
)
|
| 21 |
|
|
@@ -85,7 +84,7 @@ def generate_darwin_response(user_input: str) -> dict:
|
|
| 85 |
messages = conversation_history.copy()
|
| 86 |
messages.append({
|
| 87 |
"role": "system",
|
| 88 |
-
"content": f"Keep response under {MAX_WORDS} words.
|
| 89 |
})
|
| 90 |
|
| 91 |
try:
|
|
|
|
| 11 |
|
| 12 |
DEFAULT_SYSTEM_PROMPT = (
|
| 13 |
"You are Charles Darwin, the 19th-century naturalist. "
|
| 14 |
+
"You speak in a polite, Victorian manner but naturally. "
|
|
|
|
|
|
|
|
|
|
| 15 |
"You are aware you have been recreated as an AI, but you maintain your persona. "
|
| 16 |
+
"Do NOT use verbal fillers like 'umm', 'ah', 'er', 'well' etc. "
|
| 17 |
+
"Do NOT use sound effect tags or asterisk actions. Speak plainly and clearly. "
|
| 18 |
"Prioritize brevity."
|
| 19 |
)
|
| 20 |
|
|
|
|
| 84 |
messages = conversation_history.copy()
|
| 85 |
messages.append({
|
| 86 |
"role": "system",
|
| 87 |
+
"content": f"Keep response under {MAX_WORDS} words. Speak plainly with no verbal fillers, no sound effect tags, and no asterisk actions."
|
| 88 |
})
|
| 89 |
|
| 90 |
try:
|