Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -133,10 +133,10 @@ def respond(message, chat_history, user_profile):
|
|
| 133 |
messages = [
|
| 134 |
{"role": "system", "content": f"You are a professional interviewer conducting a {user_profile['interview_type']} interview for a candidate in the {user_profile['field']} field."}
|
| 135 |
]
|
| 136 |
-
for q, a in chat_history:
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
messages.append({"role": "user", "content": message})
|
| 140 |
|
| 141 |
response = client.chat_completion(messages, max_tokens=150, stream=False)
|
| 142 |
bot_msg = response.choices[0].message.content
|
|
|
|
| 133 |
messages = [
|
| 134 |
{"role": "system", "content": f"You are a professional interviewer conducting a {user_profile['interview_type']} interview for a candidate in the {user_profile['field']} field."}
|
| 135 |
]
|
| 136 |
+
# for q, a in chat_history:
|
| 137 |
+
# messages.append({"role": "user", "content": q})
|
| 138 |
+
# messages.append({"role": "assistant", "content": a})
|
| 139 |
+
# messages.append({"role": "user", "content": message})
|
| 140 |
|
| 141 |
response = client.chat_completion(messages, max_tokens=150, stream=False)
|
| 142 |
bot_msg = response.choices[0].message.content
|