bug fix for safety violation

This commit is contained in:
Xi Yan 2024-09-23 18:17:15 -07:00
parent 70fb70a71c
commit e5bdd6615a
3 changed files with 15 additions and 12 deletions

View file

@ -130,7 +130,7 @@ class ChatAgent(ShieldRunnerMixin):
# CompletionMessage itself in the ShieldResponse
messages.append(
CompletionMessage(
content=violation.user_message,
content=step.violation.user_message,
stop_reason=StopReason.end_of_turn,
)
)