We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09381a4 commit 72a1b49Copy full SHA for 72a1b49
backend/onyx/evals/tracing.py
@@ -16,13 +16,9 @@ def _truncate_str(s: str) -> str:
16
return f"{s[:head]}…{s[-tail:]}[TRUNCATED {len(s)} chars to {MASKING_LENGTH}]"
17
18
19
-def _should_mask(data: Any) -> bool:
20
- return len(str(data)) > MASKING_LENGTH
21
-
22
23
def _mask(data: Any) -> Any:
24
"""Mask data if it exceeds the maximum length threshold."""
25
- if not _should_mask(data):
+ if not len(str(data)) <= MASKING_LENGTH:
26
return data
27
return _truncate_str(str(data))
28
0 commit comments