Rakshitjan commited on
Commit
8644b0a
·
verified ·
1 Parent(s): bccc934

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -6
main.py CHANGED
@@ -28,9 +28,9 @@ class RoadmapInput(BaseModel):
28
  startphyRoadmapFrom: str
29
  startchemRoadmapFrom: str
30
  startmathRoadmapFrom: str
31
- userleft_topic_phy: List[str]
32
- userleft_topic_chem: List[str]
33
- userleft_topic_maths: List[str]
34
  total_time: int
35
 
36
  output_structure = """
@@ -121,9 +121,12 @@ async def generate_roadmap(input_data: RoadmapInput):
121
  chemistry_topics = get_topics_within_timeframe(chem, input_data.total_time, input_data.startchemRoadmapFrom)
122
  mathematics_topics = get_topics_within_timeframe(maths, input_data.total_time, input_data.startmathRoadmapFrom)
123
 
124
- physics_topics.insert(0, input_data.userleft_topic_phy)
125
- chemistry_topics.extend(input_data.userleft_topic_chem)
126
- mathematics_topics.extend(input_data.userleft_topic_maths)
 
 
 
127
 
128
  # User persona string
129
  userPersona = f"""
 
28
  startphyRoadmapFrom: str
29
  startchemRoadmapFrom: str
30
  startmathRoadmapFrom: str
31
+ userleft_topic_phy: List[dict]
32
+ userleft_topic_chem: List[dict]
33
+ userleft_topic_maths: List[dict]
34
  total_time: int
35
 
36
  output_structure = """
 
121
  chemistry_topics = get_topics_within_timeframe(chem, input_data.total_time, input_data.startchemRoadmapFrom)
122
  mathematics_topics = get_topics_within_timeframe(maths, input_data.total_time, input_data.startmathRoadmapFrom)
123
 
124
+ for topic in reversed(userleft_topic_phy):
125
+ physics_topics.insert(0, topic)
126
+ for topic in reversed(userleft_topic_chem):
127
+ chemistry_topics.insert(0, topic)
128
+ for topic in reversed(userleft_topic_maths):
129
+ mathematics_topics.insert(0, topic)
130
 
131
  # User persona string
132
  userPersona = f"""