CoolFace
Apppublic

SolusOps/Study-with-ChampAI

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes
tutor_agent.py15 linesDownload Raw Back to agents
1from __future__ import annotations2from services.model_router import ModelRouter3from config.prompts import TUTOR_AGENT_SYSTEM4 5class TutorAgent:6    def __init__(self, router: ModelRouter): self._router = router7 8    def hint(self, question: str, student_answer: str, correct_answer: str,9             explanation: str, source_excerpt: str = "") -> str:10        context = f"\nSource context: {source_excerpt}" if source_excerpt else ""11        prompt = (f"Question: {question}\nStudent answered: {student_answer}\n"12                  f"Correct answer (do not reveal directly): {correct_answer}\n"13                  f"Stored explanation: {explanation}{context}\n\nProvide a Socratic hint.")14        return self._router.reason(prompt, TUTOR_AGENT_SYSTEM).strip()15