mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
feat(proxy_server.py): enable admin to set banned keywords on proxy
This commit is contained in:
parent
6ad450396b
commit
acae98fd50
4 changed files with 177 additions and 0 deletions
|
@ -1489,6 +1489,16 @@ class ProxyConfig:
|
|||
|
||||
blocked_user_list = _ENTERPRISE_BlockedUserList()
|
||||
imported_list.append(blocked_user_list)
|
||||
elif (
|
||||
isinstance(callback, str)
|
||||
and callback == "banned_keywords"
|
||||
):
|
||||
from litellm.proxy.enterprise.enterprise_hooks.banned_keywords import (
|
||||
_ENTERPRISE_BannedKeywords,
|
||||
)
|
||||
|
||||
banned_keywords_obj = _ENTERPRISE_BannedKeywords()
|
||||
imported_list.append(banned_keywords_obj)
|
||||
else:
|
||||
imported_list.append(
|
||||
get_instance_fn(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue