Ashar086 commited on
Commit
05bf03d
·
verified ·
1 Parent(s): f2964d5

Update components/study_path_generator.py

Browse files
Files changed (1) hide show
  1. components/study_path_generator.py +8 -4
components/study_path_generator.py CHANGED
@@ -1,6 +1,10 @@
1
- from utils.openai_utils import call_openai
2
 
3
  def generate_study_path(level, topic):
4
- prompt = f"Generate a {level.lower()} level study plan for learning {topic}."
5
- response = call_openai(prompt, max_tokens=300)
6
- return response
 
 
 
 
 
1
+ from utils.aiml_api_utils import call_aiml_api
2
 
3
  def generate_study_path(level, topic):
4
+ # Generate the prompt based on user inputs
5
+ prompt = f"Create a {level} level study path for learning {topic}."
6
+
7
+ # Call the AI/ML API to get the generated study path
8
+ study_plan = call_aiml_api(prompt, max_tokens=500)
9
+
10
+ return study_plan