mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
correct guardrail name
This commit is contained in:
parent
11d1f4e430
commit
23f8d23acb
1 changed files with 3 additions and 2 deletions
|
@ -32,6 +32,7 @@ from litellm._logging import verbose_proxy_logger
|
||||||
|
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
|
|
||||||
|
GUARDRAIL_NAME = "hide_secrets"
|
||||||
|
|
||||||
_custom_plugins_path = "file://" + os.path.join(
|
_custom_plugins_path = "file://" + os.path.join(
|
||||||
os.path.dirname(os.path.abspath(__file__)), "secrets_plugins"
|
os.path.dirname(os.path.abspath(__file__)), "secrets_plugins"
|
||||||
|
@ -466,8 +467,8 @@ class _ENTERPRISE_SecretDetection(CustomLogger):
|
||||||
|
|
||||||
async def should_run_check(self, user_api_key_dict: UserAPIKeyAuth) -> bool:
|
async def should_run_check(self, user_api_key_dict: UserAPIKeyAuth) -> bool:
|
||||||
if user_api_key_dict.permissions is not None:
|
if user_api_key_dict.permissions is not None:
|
||||||
if "secret_detection" in user_api_key_dict.permissions:
|
if GUARDRAIL_NAME in user_api_key_dict.permissions:
|
||||||
if user_api_key_dict.permissions["secret_detection"] is False:
|
if user_api_key_dict.permissions[GUARDRAIL_NAME] is False:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue