_is_valid_include_pattern() — langchain Function Reference
Architecture documentation for the _is_valid_include_pattern() function in file_search.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 943f681c_e0cd_4a26_5c61_e9c06d70955a["_is_valid_include_pattern()"] 7e138deb_72a0_c3b2_9372_a9429bc90819["file_search.py"] 943f681c_e0cd_4a26_5c61_e9c06d70955a -->|defined in| 7e138deb_72a0_c3b2_9372_a9429bc90819 99cb0385_d25f_ae58_a625_e8187615e060["__init__()"] 99cb0385_d25f_ae58_a625_e8187615e060 -->|calls| 943f681c_e0cd_4a26_5c61_e9c06d70955a ef2e07ee_ee8e_f087_ecc5_334345441c90["_expand_include_patterns()"] 943f681c_e0cd_4a26_5c61_e9c06d70955a -->|calls| ef2e07ee_ee8e_f087_ecc5_334345441c90 style 943f681c_e0cd_4a26_5c61_e9c06d70955a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain_v1/langchain/agents/middleware/file_search.py lines 57–75
def _is_valid_include_pattern(pattern: str) -> bool:
"""Validate glob pattern used for include filters."""
if not pattern:
return False
if any(char in pattern for char in ("\x00", "\n", "\r")):
return False
expanded = _expand_include_patterns(pattern)
if expanded is None:
return False
try:
for candidate in expanded:
re.compile(fnmatch.translate(candidate))
except re.error:
return False
return True
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _is_valid_include_pattern() do?
_is_valid_include_pattern() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/agents/middleware/file_search.py.
Where is _is_valid_include_pattern() defined?
_is_valid_include_pattern() is defined in libs/langchain_v1/langchain/agents/middleware/file_search.py at line 57.
What does _is_valid_include_pattern() call?
_is_valid_include_pattern() calls 1 function(s): _expand_include_patterns.
What calls _is_valid_include_pattern()?
_is_valid_include_pattern() is called by 1 function(s): __init__.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free