fix(presidio_pii_masking.py): support logging_only pii masking

This commit is contained in:
Krrish Dholakia 2024-07-11 18:04:12 -07:00
parent 9deb9b4e3f
commit 9d918d2ac7
5 changed files with 145 additions and 8 deletions

View file

@ -90,9 +90,11 @@ class CustomLogger: # https://docs.litellm.ai/docs/observability/custom_callbac
):
pass
async def async_logging_hook(self):
"""For masking logged request/response"""
pass
async def async_logging_hook(
self, kwargs: dict, result: Any, call_type: str
) -> Tuple[dict, Any]:
"""For masking logged request/response. Return a modified version of the request/result."""
return kwargs, result
def logging_hook(
self, kwargs: dict, result: Any, call_type: str