mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-30 07:39:38 +00:00
change to return only one violation
This commit is contained in:
parent
df76c9b484
commit
1d775b342c
1 changed files with 6 additions and 8 deletions
|
@ -136,13 +136,11 @@ class BedrockSafetyAdapter(Safety, ShieldsProtocolPrivate):
|
|||
metadata = dict(assessment)
|
||||
|
||||
return RunShieldResponse(
|
||||
violations=[
|
||||
SafetyViolation(
|
||||
user_message=user_message,
|
||||
violation_level=ViolationLevel.ERROR,
|
||||
metadata=metadata,
|
||||
)
|
||||
]
|
||||
violation=SafetyViolation(
|
||||
user_message=user_message,
|
||||
violation_level=ViolationLevel.ERROR,
|
||||
metadata=metadata,
|
||||
)
|
||||
)
|
||||
|
||||
return RunShieldResponse(violations=[])
|
||||
return RunShieldResponse()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue