_build_condition() — langchain Function Reference
Architecture documentation for the _build_condition() function in vectorstores.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 35a0577e_7e7f_08c7_8d2d_5d81b8240baf["_build_condition()"] 2d095452_70a7_4606_a1b1_4650d16b5343["Qdrant"] 35a0577e_7e7f_08c7_8d2d_5d81b8240baf -->|defined in| 2d095452_70a7_4606_a1b1_4650d16b5343 369cad42_a217_229d_f010_ae322d9fc342["_qdrant_filter_from_dict()"] 369cad42_a217_229d_f010_ae322d9fc342 -->|calls| 35a0577e_7e7f_08c7_8d2d_5d81b8240baf style 35a0577e_7e7f_08c7_8d2d_5d81b8240baf fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/qdrant/langchain_qdrant/vectorstores.py lines 2061–2081
def _build_condition(self, key: str, value: Any) -> list[models.FieldCondition]:
out = []
if isinstance(value, dict):
for _key, _value in value.items():
out.extend(self._build_condition(f"{key}.{_key}", _value))
elif isinstance(value, list):
for _value in value:
if isinstance(_value, dict):
out.extend(self._build_condition(f"{key}[]", _value))
else:
out.extend(self._build_condition(f"{key}", _value))
else:
out.append(
models.FieldCondition(
key=f"{self.metadata_payload_key}.{key}",
match=models.MatchValue(value=value),
)
)
return out
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does _build_condition() do?
_build_condition() is a function in the langchain codebase, defined in libs/partners/qdrant/langchain_qdrant/vectorstores.py.
Where is _build_condition() defined?
_build_condition() is defined in libs/partners/qdrant/langchain_qdrant/vectorstores.py at line 2061.
What calls _build_condition()?
_build_condition() is called by 1 function(s): _qdrant_filter_from_dict.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free