validate_search_type() — langchain Function Reference
Architecture documentation for the validate_search_type() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD d5b7d071_0861_c0d1_d0e2_e8ba375bd798["validate_search_type()"] b8cae909_b704_b10a_76f9_9d81abaafe39["VectorDBQA"] d5b7d071_0861_c0d1_d0e2_e8ba375bd798 -->|defined in| b8cae909_b704_b10a_76f9_9d81abaafe39 style d5b7d071_0861_c0d1_d0e2_e8ba375bd798 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/chains/retrieval_qa/base.py lines 321–328
def validate_search_type(cls, values: dict) -> Any:
"""Validate search type."""
if "search_type" in values:
search_type = values["search_type"]
if search_type not in ("similarity", "mmr"):
msg = f"search_type of {search_type} not allowed."
raise ValueError(msg)
return values
Domain
Subdomains
Source
Frequently Asked Questions
What does validate_search_type() do?
validate_search_type() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/chains/retrieval_qa/base.py.
Where is validate_search_type() defined?
validate_search_type() is defined in libs/langchain/langchain_classic/chains/retrieval_qa/base.py at line 321.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free