forked from phoenix/litellm-mirror
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
Add a link
Reference in a new issue