Update app.py
Browse files
app.py
CHANGED
@@ -62,10 +62,10 @@ def chatbot(input, messages):
|
|
62 |
reply = chat.choices[0].message.content
|
63 |
logging.info("AI Reply:"+reply)
|
64 |
ans = ""
|
65 |
-
if len(messages) ==
|
66 |
ans = "I choose "+ getChooseRole(reply) +" as my race." + classAsk
|
67 |
logging.info("ChooseRole:"+ans)
|
68 |
-
if len(messages) ==
|
69 |
ans = "My Race is ,I choose "+ getChooseClass(reply) +" as my class." + classAns
|
70 |
logging.info("ChooseClass:"+ans)
|
71 |
messages.append({"role": "assistant", "content": ans})
|
|
|
62 |
reply = chat.choices[0].message.content
|
63 |
logging.info("AI Reply:"+reply)
|
64 |
ans = ""
|
65 |
+
if len(messages) == 2:
|
66 |
ans = "I choose "+ getChooseRole(reply) +" as my race." + classAsk
|
67 |
logging.info("ChooseRole:"+ans)
|
68 |
+
if len(messages) == 4:
|
69 |
ans = "My Race is ,I choose "+ getChooseClass(reply) +" as my class." + classAns
|
70 |
logging.info("ChooseClass:"+ans)
|
71 |
messages.append({"role": "assistant", "content": ans})
|