Ashar086's picture
Create components/feedback.py
1cc59d6 verified
raw
history blame
264 Bytes
from utils.openai_utils import call_openai
def get_ai_feedback(user_code):
prompt = f"Here is a user's attempt to solve a problem:\n{user_code}\nGive feedback on how they can improve it."
response = call_openai(prompt, max_tokens=200)
return response