Redact Dict • AI Agent SDK

redact_dict: Redact sensitive values from a dictionary.

redact_dict

Function

</div>

This function is defined in the redact module.

Redact sensitive values from a dictionary.

Signature

python
def redact_dict(data: Dict[str, Any], enabled: bool) -> Dict[str, Any]

Parameters

ParamField Dict[str, Any]

Dictionary to redact

ParamField bool

If False, returns data unchanged

Returns

ResponseField Dict[str, Any]

New dictionary with sensitive values redacted

Source

View on GitHub

praisonaiagents/trace/redact.py at line 90