Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions ai_chatbot_backend/app/core/models/chat_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,15 @@ class FileCompletionParams(BaseModel):
Parameters for file-based chat completions.
"""
course_code: str
audio: VoiceMessage
audio: VoiceMessage = None
messages: List[Message]
stream: bool
chat_type: str = "file" # e.g., "general", "file", "practice"
rag: Optional[bool] = True
audio_response: Optional[bool] = False
sid: Optional[str] = None # chat_history_sid from frontend
user_focus: UserFocus
tutor_mode: Optional[bool] = True # Enable tutor mode (Bloom taxonomy, hints-first)
tutor_mode: Optional[bool] = False # Enable tutor mode (Bloom taxonomy, hints-first)
json_output: Optional[bool] = True # Enable JSON output format (derived from tutor_mode if not set)

class PracticeCompletionParams(BaseModel):
Expand All @@ -174,7 +174,7 @@ class PracticeCompletionParams(BaseModel):
answer_content: str
problem_id: str
file_path: str
tutor_mode: Optional[bool] = True # Enable tutor mode (Bloom taxonomy, hints-first)
tutor_mode: Optional[bool] = False # Enable tutor mode (Bloom taxonomy, hints-first)
json_output: Optional[bool] = True # Enable JSON output format (derived from tutor_mode if not set)

class VoiceTranscriptParams(BaseModel):
Expand Down
4 changes: 2 additions & 2 deletions ai_chatbot_backend/app/services/generation/tutor/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def build_tutor_context(
# 1. Message formatting (tutor_mode=True for tutor)
messages = format_chat_msg(
messages,
tutor_mode=True,
tutor_mode=False,
audio_response=audio_response
)

Expand Down Expand Up @@ -120,7 +120,7 @@ async def build_tutor_context(
problem_content=problem_content,
answer_content=answer_content,
audio_response=audio_response,
tutor_mode=True,
tutor_mode=False,
outline_mode=True,
)

Expand Down
Loading