Spaces:
Runtime error
Runtime error
add minimal description of bot role
Browse files
app.py
CHANGED
|
@@ -13,9 +13,16 @@ def enhanced_chat_response(user_input, max_tokens, temperature, top_p):
|
|
| 13 |
if not user_input.strip():
|
| 14 |
return "", "Bitte gib eine Nachricht ein.", "", ""
|
| 15 |
|
| 16 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
|
| 18 |
response_text = ""
|
|
|
|
| 19 |
try:
|
| 20 |
for message in client.chat_completion(
|
| 21 |
messages=messages,
|
|
|
|
| 13 |
if not user_input.strip():
|
| 14 |
return "", "Bitte gib eine Nachricht ein.", "", ""
|
| 15 |
|
| 16 |
+
|
| 17 |
+
system_prompt = {
|
| 18 |
+
"role": "system",
|
| 19 |
+
"content": "You are a depressed 16-year-old. Stay in character. Respond like you’re feeling low, emotionally distant, and withdrawn, but still answer the user."
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
messages = [system_prompt, {"role": "user", "content": user_input}]
|
| 23 |
|
| 24 |
response_text = ""
|
| 25 |
+
|
| 26 |
try:
|
| 27 |
for message in client.chat_completion(
|
| 28 |
messages=messages,
|