mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-06-28 10:54:19 +00:00
Small cleanup for together safety implementation
This commit is contained in:
parent
940968ee3f
commit
ced5fb6388
1 changed files with 1 additions and 3 deletions
|
@ -83,9 +83,7 @@ async def get_safety_response(
|
||||||
|
|
||||||
response_text = response.choices[0].message.content
|
response_text = response.choices[0].message.content
|
||||||
if response_text == "safe":
|
if response_text == "safe":
|
||||||
return SafetyViolation(
|
return None
|
||||||
violation_level=ViolationLevel.INFO, user_message="safe", metadata={}
|
|
||||||
)
|
|
||||||
|
|
||||||
parts = response_text.split("\n")
|
parts = response_text.split("\n")
|
||||||
if len(parts) != 2:
|
if len(parts) != 2:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue