Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelOwenDyer committed Oct 11, 2024
1 parent b5884e0 commit 6805fa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion app/pipeline/prompts/text_exercise_chat_prompts.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ def fmt_guard_prompt(
{problem_statement}
The user says:
{user_input}
If this is on-topic and appropriate discussion, respond with "Yes". If not, respond with "No".
If this is on-topic and appropriate discussion, respond with "Yes".
If the user's input is clearly about something else or inappropriate, respond with "No".
""".format(
exercise_name=exercise_name,
course_name=course_name,
Expand Down
4 changes: 2 additions & 2 deletions app/pipeline/text_exercise_chat_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def guard(self, dto: TextExerciseChatPipelineExecutionDTO) -> bool:
course_name=dto.exercise.course.name,
course_description=dto.exercise.course.description,
problem_statement=dto.exercise.problem_statement,
user_input=dto.current_submission,
user_input=dto.conversation[-1].contents[0].text_content,
)
guard_prompt = PyrisMessage(
sender=IrisMessageRole.SYSTEM,
Expand Down Expand Up @@ -91,7 +91,7 @@ def reject(self, dto: TextExerciseChatPipelineExecutionDTO) -> str:
course_name=dto.exercise.course.name,
course_description=dto.exercise.course.description,
problem_statement=dto.exercise.problem_statement,
user_input=dto.current_submission,
user_input=dto.conversation[-1].contents[0].text_content,
)
rejection_prompt = PyrisMessage(
sender=IrisMessageRole.SYSTEM,
Expand Down

0 comments on commit 6805fa9

Please sign in to comment.