Ashar086's picture
Update components/feedback.py
fd7ad95 verified
raw
history blame contribute delete
334 Bytes
from utils.aiml_api_utils import call_aiml_api
def get_ai_feedback(user_code):
# Create the prompt for AI feedback
prompt = f"Provide constructive feedback for the following code:\n\n{user_code}"
# Call the AI/ML API to generate feedback
feedback = call_aiml_api(prompt, max_tokens=300)
return feedback