From 645e1081ddbb8f0d6fcf70240e3fa5747ffb223d Mon Sep 17 00:00:00 2001 From: Prathameshdhande22 Date: Sun, 14 Apr 2024 21:28:09 +0530 Subject: [PATCH] fix: Added some Extra Message for information --- bot/chatModule.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bot/chatModule.py b/bot/chatModule.py index 3da862c..f0f8091 100644 --- a/bot/chatModule.py +++ b/bot/chatModule.py @@ -165,7 +165,7 @@ def askQuestion(msg: Reply, session: Session) -> dict | str: recommend = True return [ msg, - f"The input you provided is {already_known} and our model predicted as {prakriti.prakriti} is different.", + f"The input you provided is {already_known.title()} and our model predicted as {prakriti.prakriti.title()} is different.", "It seems that there may be one or more incorrect answers to the questions you provided. Please review and verify your responses.", { "question": "Want Diet Recommendation based on Your Prakriti?", @@ -181,7 +181,6 @@ def askQuestion(msg: Reply, session: Session) -> dict | str: "options": {0: "yes", 1: "no"}, }, ] - return questions.get(i) @@ -254,7 +253,7 @@ async def chatWithUser(msg: Reply, session: Session) -> ChatResponse: if start_questionaire: return { "response": [ - f"Your Response has been recorded as {already_known}", + f"Your Response has been recorded as {already_known.title()}", "Please provide the answer to the following question to enhance my accuracy. I will then use your response for analysis.", askQuestion(msg, session), ] @@ -320,11 +319,13 @@ async def chatWithUser(msg: Reply, session: Session) -> ChatResponse: elif recommend: if str(msg.get("message")).lower().strip() == "yes": diet = recommend_Diet(prakriti.prakriti) + diet.append( + "Thank You For predicting Prakriti with AYURBOT") clearAll() return {"response": diet} else: clearAll() - return {"response": "Skipped Diet Recommendation"} + return {"response": ["Skipped Diet Recommendation", "Thank You For predicting Prakriti with AYURBOT"]} else: reply: Response = getResponseChat(msg["message"]) print(f"tag => {reply['tag']} , message => {reply['response']}") @@ -332,6 +333,7 @@ async def chatWithUser(msg: Reply, session: Session) -> ChatResponse: flag = True resp = [ reply.get("response"), + "NOTE: Click on Exclamation Mark at the Right hand side of the each Question to Know the Explanation of the asked Question and Options.", { "question": "Answer Yes to get Started?", "options": {0: "yes", 1: "no"},