use redact_message_input_output_from_custom_logger

This commit is contained in:
Ishaan Jaff 2024-09-09 16:02:24 -07:00
parent b86075ef9a
commit 12d8c0d0a4

View file

@ -28,6 +28,7 @@ from litellm.cost_calculator import _select_model_name_for_cost_calc
from litellm.integrations.custom_guardrail import CustomGuardrail
from litellm.integrations.custom_logger import CustomLogger
from litellm.litellm_core_utils.redact_messages import (
redact_message_input_output_from_custom_logger,
redact_message_input_output_from_logging,
)
from litellm.rerank_api.types import RerankResponse
@ -1395,6 +1396,9 @@ class Logging:
call_type=self.call_type,
)
elif isinstance(callback, CustomLogger):
result = redact_message_input_output_from_custom_logger(
result=result, litellm_logging_obj=self, custom_logger=callback
)
self.model_call_details, result = await callback.async_logging_hook(
kwargs=self.model_call_details,
result=result,