Spaces:
Running
Running
Update components/feedback.py
Browse files- components/feedback.py +8 -4
components/feedback.py
CHANGED
@@ -1,6 +1,10 @@
|
|
1 |
-
from utils.
|
2 |
|
3 |
def get_ai_feedback(user_code):
|
4 |
-
|
5 |
-
|
6 |
-
|
|
|
|
|
|
|
|
|
|
1 |
+
from utils.aiml_api_utils import call_aiml_api
|
2 |
|
3 |
def get_ai_feedback(user_code):
|
4 |
+
# Create the prompt for AI feedback
|
5 |
+
prompt = f"Provide constructive feedback for the following code:\n\n{user_code}"
|
6 |
+
|
7 |
+
# Call the AI/ML API to generate feedback
|
8 |
+
feedback = call_aiml_api(prompt, max_tokens=300)
|
9 |
+
|
10 |
+
return feedback
|