Spaces:
Running
Running
Create components/study_path_generator.py
Browse files
components/study_path_generator.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|