Spaces:
Runtime error
Runtime error
add print
Browse files
app.py
CHANGED
@@ -53,7 +53,9 @@ async def get_response(user_role, user_text, ai_role, chatbot):
|
|
53 |
ai_roles_obj[role_en].dialogue_history = copy.deepcopy(chatbot)
|
54 |
response = ai_roles_obj[role_en].chat(role=user_role, text=user_text)
|
55 |
user_msg = user_role + ':γ' + user_text + 'γ'
|
56 |
-
|
|
|
|
|
57 |
return chatbot
|
58 |
|
59 |
async def respond(user_role, user_text, ai_role, chatbot):
|
|
|
53 |
ai_roles_obj[role_en].dialogue_history = copy.deepcopy(chatbot)
|
54 |
response = ai_roles_obj[role_en].chat(role=user_role, text=user_text)
|
55 |
user_msg = user_role + ':γ' + user_text + 'γ'
|
56 |
+
latest_msg = (user_msg, response)
|
57 |
+
print(latest_msg)
|
58 |
+
chatbot.append(latest_msg)
|
59 |
return chatbot
|
60 |
|
61 |
async def respond(user_role, user_text, ai_role, chatbot):
|