7 matches across 1 files for func main path:libs/langchain_v1/langchain/agents/middleware/pii.py
snippet_mode: auto · sorted by relevance
libs/langchain_v1/langchain/agents/middleware/pii.py PYTHON 7 matches · showing 5 view file →
3from __future__ import annotations
4
5from functools import partial
6from typing import TYPE_CHECKING, Any, ClassVar, Literal
7
· · ·
52
53 Runs before built-in stream transformers so the redacted text is what
54 every downstream consumer sees — both the main protocol event log and
55 the `run.messages` projection that `MessagesTransformer` snapshots into.
56
· · ·
105 with `_redact_value` returns a fresh structure where every
106 message has a redacted copy of its content — the original
107 objects in graph state remain intact for the state-level
108 enforcer (`apply_to_tool_results` via `before_model`) to act on
109 independently when the agent loops back.
· · ·
582 * `hash`: Replace with deterministic hash (format: `<type_hash:digest>`)
583
584 detector: Custom detector function or regex pattern.
585
586 * If `Callable`: Function that takes content string and returns
· · ·
586 * If `Callable`: Function that takes content string and returns
587 list of `PIIMatch` objects
588 * If `str`: Regex pattern to match PII
+ 2 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.