mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-19 00:01:29 +00:00
style(logging): format callback redaction flow
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
6d251a6cc0
commit
19b44e3e05
1 changed files with 11 additions and 5 deletions
|
|
@ -3194,7 +3194,9 @@ class Logging(LiteLLMLoggingBaseClass):
|
|||
)
|
||||
|
||||
if isinstance(callback, CustomLogger): # custom logger class
|
||||
callback_model_call_details: Final[dict] = self.model_call_details # mutable-ok: callback payload API
|
||||
callback_model_call_details: Final[dict] = (
|
||||
self.model_call_details
|
||||
) # mutable-ok: callback payload API
|
||||
##################################
|
||||
# call redaction hook for custom logger
|
||||
standard_redacted_model_call_details: Final[dict] = ( # mutable-ok: callback payload API
|
||||
|
|
@ -3202,11 +3204,15 @@ class Logging(LiteLLMLoggingBaseClass):
|
|||
model_call_details=callback_model_call_details
|
||||
)
|
||||
)
|
||||
streaming_redacted_model_call_details: Final[dict] = redact_streaming_responses_for_custom_logger( # mutable-ok: callback payload API
|
||||
model_call_details=standard_redacted_model_call_details, custom_logger=callback
|
||||
streaming_redacted_model_call_details: Final[dict] = (
|
||||
redact_streaming_responses_for_custom_logger( # mutable-ok: callback payload API
|
||||
model_call_details=standard_redacted_model_call_details, custom_logger=callback
|
||||
)
|
||||
)
|
||||
redacted_model_call_details: Final[dict] = redact_model_call_details_for_custom_logger( # mutable-ok: callback payload API
|
||||
model_call_details=streaming_redacted_model_call_details, custom_logger=callback
|
||||
redacted_model_call_details: Final[dict] = (
|
||||
redact_model_call_details_for_custom_logger( # mutable-ok: callback payload API
|
||||
model_call_details=streaming_redacted_model_call_details, custom_logger=callback
|
||||
)
|
||||
)
|
||||
##################################
|
||||
if self.stream is True:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue