Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ client = Groq(api_key=api_key)
|
|
11 |
def generate_response(user_input, chat_history: list):
|
12 |
try:
|
13 |
# Prepare messages with chat history
|
14 |
-
messages = [{"role": "system", "content": "You are a mental health assistant. Your responses should be empathetic, non-judgmental, and provide helpful advice based on mental health principles. Always encourage seeking professional help when needed."}]
|
15 |
|
16 |
# Iterate through chat history and add user and assistant messages
|
17 |
for message in chat_history:
|
|
|
11 |
def generate_response(user_input, chat_history: list):
|
12 |
try:
|
13 |
# Prepare messages with chat history
|
14 |
+
messages = [{"role": "system", "content": "You are a mental health assistant. Your responses should be empathetic, non-judgmental, and provide helpful advice based on mental health principles. Always encourage seeking professional help when needed. Your responses should look human as well."}]
|
15 |
|
16 |
# Iterate through chat history and add user and assistant messages
|
17 |
for message in chat_history:
|