Home / Function/ test_similarity_tool() — langchain Function Reference

test_similarity_tool() — langchain Function Reference

Architecture documentation for the test_similarity_tool() function in test_find_similar_tool.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  9cf127c1_b32d_31cd_3281_654f51ebfeb6["test_similarity_tool()"]
  ccc3c646_6b74_58ec_a7a3_25ee6703b48a["test_find_similar_tool.py"]
  9cf127c1_b32d_31cd_3281_654f51ebfeb6 -->|defined in| ccc3c646_6b74_58ec_a7a3_25ee6703b48a
  style 9cf127c1_b32d_31cd_3281_654f51ebfeb6 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/exa/tests/integration_tests/test_find_similar_tool.py lines 8–18

def test_similarity_tool() -> None:
    """Test that the Exa find similar tool works."""
    tool = ExaFindSimilarResults()
    res = tool.invoke(
        {
            "url": "https://boutiquejapan.com/when-is-the-best-time-of-year-to-visit-japan/",
            "num_results": 5,
        }
    )
    print(res)  # noqa: T201
    assert not isinstance(res, str)  # str means error for this tool

Domain

Subdomains

Frequently Asked Questions

What does test_similarity_tool() do?
test_similarity_tool() is a function in the langchain codebase, defined in libs/partners/exa/tests/integration_tests/test_find_similar_tool.py.
Where is test_similarity_tool() defined?
test_similarity_tool() is defined in libs/partners/exa/tests/integration_tests/test_find_similar_tool.py at line 8.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free