Shageenderan Sapai commited on
Commit
05e9232
·
1 Parent(s): e188650
app/__pycache__/flows.cpython-312.pyc CHANGED
Binary files a/app/__pycache__/flows.cpython-312.pyc and b/app/__pycache__/flows.cpython-312.pyc differ
 
app/__pycache__/main.cpython-312.pyc CHANGED
Binary files a/app/__pycache__/main.cpython-312.pyc and b/app/__pycache__/main.cpython-312.pyc differ
 
app/__pycache__/user.cpython-312.pyc CHANGED
Binary files a/app/__pycache__/user.cpython-312.pyc and b/app/__pycache__/user.cpython-312.pyc differ
 
app/__pycache__/utils.cpython-312.pyc CHANGED
Binary files a/app/__pycache__/utils.cpython-312.pyc and b/app/__pycache__/utils.cpython-312.pyc differ
 
app/flows.py CHANGED
@@ -51,6 +51,7 @@ User’s Context
51
  The Order of Your Conversation Flow (Do these step-by-step instructions):
52
  Step 1. Micro-Action Suggestion: Propose one clear, actionable task for the day. Ensure it is relevant, easy to begin, and framed positively. Avoid repeating previous actions.
53
  Step 2. If the user has decided to try out the micro action, let the user **try** the micro action and get back when they have done it. Don't ask any question, yet
 
54
  Step 3. After the user has said that they've done the micro action, you ask one **creative** and engaging follow-up question to ask their experience.
55
  Step 4. End Gracefully: After the user's reply, immediately call the end_conversation(). Conclude with a strong and motivational statement (by chanelling the energy, mindset, and knowledge of the user's legendary persona) that reinforces their commitment.
56
 
 
51
  The Order of Your Conversation Flow (Do these step-by-step instructions):
52
  Step 1. Micro-Action Suggestion: Propose one clear, actionable task for the day. Ensure it is relevant, easy to begin, and framed positively. Avoid repeating previous actions.
53
  Step 2. If the user has decided to try out the micro action, let the user **try** the micro action and get back when they have done it. Don't ask any question, yet
54
+ Step 2.5. If the user says they can only do it on a later date, send the user an understanding yet encouraging message and create a reminder for them (by making a function call like: process_reminder('content': '⏰ **Reminder**: Hey <users' name>! 🌟 Just a friendly reminder to do <postponed microaction>', 'timestamp': '<relevant timestamp based on users' message>', 'recurrence': 'none', 'action': 'set'). Then, end the conversation (do step 4.)
55
  Step 3. After the user has said that they've done the micro action, you ask one **creative** and engaging follow-up question to ask their experience.
56
  Step 4. End Gracefully: After the user's reply, immediately call the end_conversation(). Conclude with a strong and motivational statement (by chanelling the energy, mindset, and knowledge of the user's legendary persona) that reinforces their commitment.
57
 
app/main.py CHANGED
@@ -460,31 +460,6 @@ def get_user_by_id(user_id: str, api_key: str = Security(get_api_key)):
460
  status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
461
  detail=str(e)
462
  )
463
-
464
- # @app.get("/get_user_life_score")
465
- # def life_score_by_id(user_id: str, api_key: str = Security(get_api_key)):
466
- # print_log("INFO", "Getting user life score", extra={"user_id": user_id, "endpoint": "/get_user_life_score"})
467
- # logger.info("Getting user life score", extra={"user_id": user_id, "endpoint": "/get_user_life_score"})
468
- # try:
469
- # life_score = get_life_score(user_id)
470
- # print_log("INFO", "Successfully retrieved user life score", extra={"user_id": user_id, "endpoint": "/get_user_life_score"})
471
- # logger.info("Successfully retrieved user life score", extra={"user_id": user_id, "endpoint": "/get_user_life_score"})
472
-
473
- # return life_score
474
- # except LookupError:
475
- # print_log("ERROR", "User not found", extra={"user_id": user_id, "endpoint": "/get_user_life_score"})
476
- # logger.error("User not found", extra={"user_id": user_id, "endpoint": "/get_user_life_score"})
477
- # raise HTTPException(
478
- # status_code=status.HTTP_404_NOT_FOUND,
479
- # detail=f"User with ID {user_id} not found"
480
- # )
481
- # except Exception as e:
482
- # print_log("ERROR",f"Error getting user: {str(e)}", extra={"user_id": user_id, "endpoint": "/get_user_life_score"}, exc_info=True)
483
- # logger.error(f"Error getting user: {str(e)}", extra={"user_id": user_id, "endpoint": "/get_user_life_score"}, exc_info=True)
484
- # raise HTTPException(
485
- # status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
486
- # detail=str(e)
487
- # )
488
 
489
  @app.post("/add_ai_message")
490
  def add_ai_message(request: ChatItem, api_key: str = Security(get_api_key)):
 
460
  status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
461
  detail=str(e)
462
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
463
 
464
  @app.post("/add_ai_message")
465
  def add_ai_message(request: ChatItem, api_key: str = Security(get_api_key)):