forked from phoenix/litellm-mirror
init secret detection callback
This commit is contained in:
parent
4aa686bb05
commit
e22c9ba0cc
1 changed files with 15 additions and 0 deletions
|
@ -1479,6 +1479,21 @@ class ProxyConfig:
|
||||||
|
|
||||||
llama_guard_object = _ENTERPRISE_LlamaGuard()
|
llama_guard_object = _ENTERPRISE_LlamaGuard()
|
||||||
imported_list.append(llama_guard_object)
|
imported_list.append(llama_guard_object)
|
||||||
|
elif (
|
||||||
|
isinstance(callback, str) and callback == "hide_secrets"
|
||||||
|
):
|
||||||
|
from enterprise.enterprise_hooks.secret_detection import (
|
||||||
|
_ENTERPRISE_SecretDetection,
|
||||||
|
)
|
||||||
|
|
||||||
|
if premium_user != True:
|
||||||
|
raise Exception(
|
||||||
|
"Trying to use secret hiding"
|
||||||
|
+ CommonProxyErrors.not_premium_user.value
|
||||||
|
)
|
||||||
|
|
||||||
|
_secret_detection_object = _ENTERPRISE_SecretDetection()
|
||||||
|
imported_list.append(_secret_detection_object)
|
||||||
elif (
|
elif (
|
||||||
isinstance(callback, str)
|
isinstance(callback, str)
|
||||||
and callback == "openai_moderations"
|
and callback == "openai_moderations"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue