fix checking if _known_custom_logger_compatible_callbacks

This commit is contained in:
Ishaan Jaff 2024-07-22 15:43:43 -07:00
parent d8d08a1ba3
commit 15c109f023
2 changed files with 7 additions and 7 deletions

View file

@ -23,11 +23,11 @@ def initialize_callbacks_on_proxy(
)
if isinstance(value, list):
imported_list: List[Any] = []
known_compatible_callbacks = list(
get_args(litellm._custom_logger_compatible_callbacks_literal)
)
for callback in value: # ["presidio", <my-custom-callback>]
if isinstance(callback, str) and callback in known_compatible_callbacks:
if (
isinstance(callback, str)
and callback in litellm._known_custom_logger_compatible_callbacks
):
imported_list.append(callback)
elif isinstance(callback, str) and callback == "otel":
from litellm.integrations.opentelemetry import OpenTelemetry