Shageenderan Sapai commited on
Commit
0b5b139
·
1 Parent(s): 5e413ce

Alignment

Browse files
Files changed (1) hide show
  1. app/user.py +8 -11
app/user.py CHANGED
@@ -11,8 +11,9 @@ import random
11
  import logging
12
  import psycopg2
13
  from psycopg2 import sql
 
14
 
15
- from app.flows import FINAL_SUMMARY_STATE, FINAL_SUMMARY_STATE, MICRO_ACTION_STATE, MOTIVATION_INSPIRATION_STATE, OPEN_DISCUSSION_STATE, POST_GG_STATE, PROGRESS_REFLECTION_STATE, PROGRESS_SUMMARY_STATE, EDUCATION_STATE, FOLLUP_ACTION_STATE
16
  from pydantic import BaseModel
17
  from datetime import datetime
18
 
@@ -400,18 +401,10 @@ class User:
400
  },
401
  {
402
  "day": 4,
403
- "coachingTheme": "MICRO_ACTION_STATE"
404
  },
405
  {
406
  "day": 5,
407
- "coachingTheme": "FOLLUP_ACTION_STATE"
408
- },
409
- {
410
- "day": 6,
411
- "coachingTheme": "OPEN_DISCUSSION_STATE"
412
- },
413
- {
414
- "day": 7,
415
  "coachingTheme": "FINAL_SUMMARY_STATE"
416
  }
417
  ]
@@ -841,7 +834,11 @@ class User:
841
  elif theme == "FOLLUP_ACTION_STATE":
842
  reminder_message = "\n".join([f"{i+1}. {reminder}" for i, reminder in enumerate(reminders)]) if reminders else "User has no postponed micro-actions"
843
  formatted_message = FOLLUP_ACTION_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array), reminder_message)
844
-
 
 
 
 
845
  # prompt = f"""** It is a new day: {date} **
846
  # Additional System Instruction:
847
  # - Remember all of the user's personal information. Use this information to be as personalised as possible when conversing by including it in your responses where relevant.
 
11
  import logging
12
  import psycopg2
13
  from psycopg2 import sql
14
+ import random
15
 
16
+ from app.flows import FINAL_SUMMARY_STATE, FINAL_SUMMARY_STATE, MICRO_ACTION_STATE, MOTIVATION_INSPIRATION_STATE, OPEN_DISCUSSION_STATE, POST_GG_STATE, PROGRESS_REFLECTION_STATE, PROGRESS_SUMMARY_STATE, EDUCATION_STATE, FOLLUP_ACTION_STATE, FUNFACT_STATE
17
  from pydantic import BaseModel
18
  from datetime import datetime
19
 
 
401
  },
402
  {
403
  "day": 4,
404
+ "coachingTheme": "FUNFACT_STATE"
405
  },
406
  {
407
  "day": 5,
 
 
 
 
 
 
 
 
408
  "coachingTheme": "FINAL_SUMMARY_STATE"
409
  }
410
  ]
 
834
  elif theme == "FOLLUP_ACTION_STATE":
835
  reminder_message = "\n".join([f"{i+1}. {reminder}" for i, reminder in enumerate(reminders)]) if reminders else "User has no postponed micro-actions"
836
  formatted_message = FOLLUP_ACTION_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array), reminder_message)
837
+ elif theme == "FUNFACT_STATE":
838
+ topics = ["Fun Fact about the User's Goal", "How Personality Type is affecting/shaping their behaviour towards the goal", "How Love Language may impact and be relevant toward the goal"]
839
+ randomized_topic = random.choice(topics)
840
+ formatted_message = FUNFACT_STATE.format(self.get_current_goal(), day, len(self.growth_plan.array), randomized_topic)
841
+
842
  # prompt = f"""** It is a new day: {date} **
843
  # Additional System Instruction:
844
  # - Remember all of the user's personal information. Use this information to be as personalised as possible when conversing by including it in your responses where relevant.