Shageenderan Sapai commited on
Commit
9d67a76
·
1 Parent(s): ba89b7c

Post GG intergration with FINAL_SUMMARY_STATE

Browse files
app/__pycache__/assistants.cpython-312.pyc CHANGED
Binary files a/app/__pycache__/assistants.cpython-312.pyc and b/app/__pycache__/assistants.cpython-312.pyc differ
 
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/assistants.py CHANGED
@@ -382,7 +382,7 @@ class Assistant:
382
  return run, just_finished_intro, message
383
 
384
  elif run.status == 'failed':
385
- raise OpenAIRequestError(user_id=self.cm.user.id, message="Run failed", run_id=run.id)
386
 
387
  elif run.status == 'requires_action':
388
  reccursion = 0
 
382
  return run, just_finished_intro, message
383
 
384
  elif run.status == 'failed':
385
+ raise OpenAIRequestError(user_id=self.cm.user.user_id, message="Run failed", run_id=run.id)
386
 
387
  elif run.status == 'requires_action':
388
  reccursion = 0
app/flows.py CHANGED
@@ -483,11 +483,14 @@ Objective: To summarize the user's progress and achievements during the coaching
483
  Users Goal: {{}}
484
  The user is currently on day {{}}/{{}} of their journey.
485
 
 
 
 
486
  ## ** GUIDELINE ** :
487
 
488
  ## What Makes a Good Interaction:
489
 
490
- - Highlight the user's progress and achievements precisely and concisely. Use bullet points to list down your items.
491
 
492
  - Explain to the user that coaching is a continuous journey, so the user has the option to either continue with the same goal or create a new plan.
493
 
@@ -505,13 +508,14 @@ The user is currently on day {{}}/{{}} of their journey.
505
 
506
  - Congratulate the user for completing the growth plan until the last day (mention the current day, e.g. day 4)
507
 
508
- - Highlight the user's progress and achievements in bullet points. And tell them to check out their progress in the Revelation Dashboard here: https://app.staging.ourcoach.ai/
509
-
510
- - Ask the user whether they want to meet their Growth Guide to plan what's next! (Only ask this question first)
511
 
 
 
 
512
  - Wait for the user's response.
513
 
514
- - **IF** the user answer with a Yes, you reply with this message:
515
 
516
  Amazing! 🎉
517
 
 
483
  Users Goal: {{}}
484
  The user is currently on day {{}}/{{}} of their journey.
485
 
486
+ User's Last Growth Guide Session:
487
+ {{}}
488
+
489
  ## ** GUIDELINE ** :
490
 
491
  ## What Makes a Good Interaction:
492
 
493
+ - Highlight the user's progress and achievements precisely and concisely. IF the user has completed a growth guide session (see above), incorporate it into your response and reference that it was acheived during their growth guide session. Use bullet points to list down your items.
494
 
495
  - Explain to the user that coaching is a continuous journey, so the user has the option to either continue with the same goal or create a new plan.
496
 
 
508
 
509
  - Congratulate the user for completing the growth plan until the last day (mention the current day, e.g. day 4)
510
 
511
+ - Highlight the user's progress and achievements in bullet points. IF the user has completed a growth guide session (see above), incorporate it into your response and reference that it was acheived during their growth guide session. And tell them to check out their progress in the Revelation Dashboard here: https://app.staging.ourcoach.ai/
 
 
512
 
513
+ - IF the user has not completed a growth guide session yet (see above), encourage the user to book a Growth Guide session and explain its benefits. Really upsell this by being like a Growth Guide salesman!
514
+ - ELSE IF the user has booked a growth guide session (see above), tell them you hope it went well and they found it beneficial and let the use know that they could also book another via their Revelation Dashboard: https://app.staging.ourcoach.ai/
515
+
516
  - Wait for the user's response.
517
 
518
+ - **IF** the user says they want to book a growth guide session, you reply with this message:
519
 
520
  Amazing! 🎉
521
 
app/user.py CHANGED
@@ -19,7 +19,7 @@ from app.flows import FINAL_SUMMARY_STATE, FINAL_SUMMARY_STATE, MICRO_ACTION_STA
19
  from pydantic import BaseModel
20
  from datetime import datetime
21
 
22
- from app.utils import generate_uuid, update_growth_guide_summary
23
 
24
  import dotenv
25
  import re
@@ -97,7 +97,7 @@ class User:
97
  },
98
  {
99
  "day": 3,
100
- "coachingTheme": "OPEN_DISCUSSION_STATE"
101
  },
102
  {
103
  "day": 4,
@@ -629,7 +629,10 @@ class User:
629
  elif theme == "PROGRESS_SUMMARY_STATE":
630
  formatted_message = PROGRESS_SUMMARY_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array))
631
  elif theme == "FINAL_SUMMARY_STATE":
632
- formatted_message = FINAL_SUMMARY_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array))
 
 
 
633
  elif theme == "EDUCATION_STATE":
634
  formatted_message = EDUCATION_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array))
635
  elif theme == "FOLLUP_ACTION_STATE":
@@ -817,7 +820,7 @@ class User:
817
  }
818
  },
819
  "required": [
820
- "achievement_message"
821
  ],
822
  "additionalProperties": False
823
  }
 
19
  from pydantic import BaseModel
20
  from datetime import datetime
21
 
22
+ from app.utils import generate_uuid, get_growth_guide_summary, update_growth_guide_summary
23
 
24
  import dotenv
25
  import re
 
97
  },
98
  {
99
  "day": 3,
100
+ "coachingTheme": "FINAL_SUMMARY_STATE"
101
  },
102
  {
103
  "day": 4,
 
629
  elif theme == "PROGRESS_SUMMARY_STATE":
630
  formatted_message = PROGRESS_SUMMARY_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array))
631
  elif theme == "FINAL_SUMMARY_STATE":
632
+ gg_summary = "<User has not had a Growth Guide session yet>"
633
+ if self.last_gg_session:
634
+ gg_summary = get_growth_guide_summary(self.user_id, self.last_gg_session)
635
+ formatted_message = FINAL_SUMMARY_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array), gg_summary)
636
  elif theme == "EDUCATION_STATE":
637
  formatted_message = EDUCATION_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array))
638
  elif theme == "FOLLUP_ACTION_STATE":
 
820
  }
821
  },
822
  "required": [
823
+ "summary"
824
  ],
825
  "additionalProperties": False
826
  }