[FEATURE] Add Logic to Calculate and Get Life Score

#1
by LittleKnife - opened
ourcoach.ai org
No description provided.
LittleKnife changed pull request status to open

Hi @BMCVRN ,

Here are a recap of all the changes

  1. Added GET get_user_life_score endpoint in main.py to get a dictionary of user life scores in different area
  2. This endpoint will call the get_life_score() function in utils.py, which will get the life score from the user object
  3. As mentioned in number 2, the life scores will be a part of the user object, so i’ve added the life scores as variables in the user.py
  4. Create a function called “add_life_score_point”, that will be called every time the user finishes an activity that adds their life score points. This function is called when:
  • the user set_goal() or update_goal (that might triggers set_goal)
  • the user completes a goal or update_goal_status(), which will be triggered from a func call
  • the user books a session or add_point_for_booking()
  • the user completes a session or add_point_for_completing_session()
  • the user reaches day 7 & 14 (when change_date())
  • the user shared a deep reflection, which will make the assistant call end_conversation() with area_of_deep_reflection = [], and we will trigger the trigger_deep_reflection_point that will iterate all items inside the list to add the points
  • the user completed their 1st, 3rd, 5th, 10th, ... every 10 multipler micro action
  1. Configured the func call mechanism in openai assistant page & assistants.py to accommodate all changes above
BMCVRN changed pull request status to merged

Sign up or log in to comment