mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-07-30 23:51:00 +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)
|
metadata = dict(assessment)
|
||||||
|
|
||||||
return RunShieldResponse(
|
return RunShieldResponse(
|
||||||
violations=[
|
violation=SafetyViolation(
|
||||||
SafetyViolation(
|
user_message=user_message,
|
||||||
user_message=user_message,
|
violation_level=ViolationLevel.ERROR,
|
||||||
violation_level=ViolationLevel.ERROR,
|
metadata=metadata,
|
||||||
metadata=metadata,
|
)
|
||||||
)
|
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return RunShieldResponse(violations=[])
|
return RunShieldResponse()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue