mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
fix - lakera ai integration
This commit is contained in:
parent
ec41226ee8
commit
03ec8219a4
1 changed files with 4 additions and 1 deletions
|
|
@ -107,7 +107,10 @@ class _ENTERPRISE_lakeraAI_Moderation(CustomLogger):
|
|||
"""
|
||||
_json_response = response.json()
|
||||
_results = _json_response.get("results", [])
|
||||
flagged = _results.get("flagged", False)
|
||||
if len(_results) <= 0:
|
||||
return
|
||||
|
||||
flagged = _results[0].get("flagged", False)
|
||||
|
||||
if flagged == True:
|
||||
raise HTTPException(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue