Skip to content

Commit

Permalink
Merge pull request #34 from SAIG-KMITL/fix/generate-roadmap
Browse files Browse the repository at this point in the history
fix: running priority
  • Loading branch information
MAOK-Yongsuk authored Nov 28, 2024
2 parents 29f31f0 + 0568e69 commit f8ebb5c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/roadmap_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,15 @@ def validated_roadmap_course(courses: List[Any], validated_roadmap: List[Dict[st
seen_ids = set()
unique_courses = []
total_duration = 0
current_priority = 1

for course in validated_roadmap:
if course["id"] in valid_course_ids and course["id"] not in seen_ids:
course['priority'] = current_priority
unique_courses.append(course)
seen_ids.add(course["id"])
total_duration += course["duration"]
current_priority+=1

return unique_courses, total_duration

Expand Down

0 comments on commit f8ebb5c

Please sign in to comment.