Small cleanup for together safety implementation

This commit is contained in:
Ashwin Bharambe 2024-09-28 15:47:35 -07:00
parent 940968ee3f
commit ced5fb6388

View file

@ -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: