test_search_domain_filter() — langchain Function Reference
Architecture documentation for the test_search_domain_filter() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 453ba8ad_5979_edb8_755c_2f78e32db84c["test_search_domain_filter()"] 974a163b_6ea0_9385_8678_c36e3c96fcdf["TestChatPerplexityIntegration"] 453ba8ad_5979_edb8_755c_2f78e32db84c -->|defined in| 974a163b_6ea0_9385_8678_c36e3c96fcdf style 453ba8ad_5979_edb8_755c_2f78e32db84c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/perplexity/tests/integration_tests/test_chat_models.py lines 93–101
def test_search_domain_filter(self) -> None:
"""Test search_domain_filter parameter."""
chat = ChatPerplexity(model="sonar", search_domain_filter=["wikipedia.org"])
message = HumanMessage(content="Python programming language")
response = chat.invoke([message])
# Verify citations come from wikipedia if any
if citations := response.additional_kwargs.get("citations"):
assert any("wikipedia.org" in c for c in citations)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_search_domain_filter() do?
test_search_domain_filter() is a function in the langchain codebase, defined in libs/partners/perplexity/tests/integration_tests/test_chat_models.py.
Where is test_search_domain_filter() defined?
test_search_domain_filter() is defined in libs/partners/perplexity/tests/integration_tests/test_chat_models.py at line 93.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free