mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
feat(google_text_moderation.py): allow user to use google text moderation for content mod on proxy
This commit is contained in:
parent
73acdf3736
commit
ddf0911c46
4 changed files with 122 additions and 19 deletions
|
@ -1427,6 +1427,18 @@ class ProxyConfig:
|
|||
|
||||
llama_guard_object = _ENTERPRISE_LlamaGuard()
|
||||
imported_list.append(llama_guard_object)
|
||||
elif (
|
||||
isinstance(callback, str)
|
||||
and callback == "google_text_moderation"
|
||||
):
|
||||
from litellm.proxy.enterprise.enterprise_hooks.google_text_moderation import (
|
||||
_ENTERPRISE_GoogleTextModeration,
|
||||
)
|
||||
|
||||
google_text_moderation_obj = (
|
||||
_ENTERPRISE_GoogleTextModeration()
|
||||
)
|
||||
imported_list.append(google_text_moderation_obj)
|
||||
else:
|
||||
imported_list.append(
|
||||
get_instance_fn(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue