Home / File/ test_listwise_rerank.py — langchain Source File

test_listwise_rerank.py — langchain Source File

Architecture documentation for test_listwise_rerank.py, a python file in the langchain codebase. 3 imports, 0 dependents.

File python LangChainCore ApiManagement 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  d454da5f_12a5_7d33_13fb_41e00ff9d3c1["test_listwise_rerank.py"]
  f69d6389_263d_68a4_7fbf_f14c0602a9ba["pytest"]
  d454da5f_12a5_7d33_13fb_41e00ff9d3c1 --> f69d6389_263d_68a4_7fbf_f14c0602a9ba
  033008d0_bf89_578a_80e2_890155c01cc0["langchain_classic.retrievers.document_compressors.listwise_rerank"]
  d454da5f_12a5_7d33_13fb_41e00ff9d3c1 --> 033008d0_bf89_578a_80e2_890155c01cc0
  2cad93e6_586a_5d28_a74d_4ec6fd4d2227["langchain_openai"]
  d454da5f_12a5_7d33_13fb_41e00ff9d3c1 --> 2cad93e6_586a_5d28_a74d_4ec6fd4d2227
  style d454da5f_12a5_7d33_13fb_41e00ff9d3c1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import pytest

from langchain_classic.retrievers.document_compressors.listwise_rerank import (
    LLMListwiseRerank,
)


@pytest.mark.requires("langchain_openai")
def test__list_rerank_init() -> None:
    from langchain_openai import ChatOpenAI

    LLMListwiseRerank.from_llm(
        llm=ChatOpenAI(api_key="foo"),
        top_n=10,
    )

Domain

Subdomains

Dependencies

  • langchain_classic.retrievers.document_compressors.listwise_rerank
  • langchain_openai
  • pytest

Frequently Asked Questions

What does test_listwise_rerank.py do?
test_listwise_rerank.py is a source file in the langchain codebase, written in python. It belongs to the LangChainCore domain, ApiManagement subdomain.
What functions are defined in test_listwise_rerank.py?
test_listwise_rerank.py defines 1 function(s): test__list_rerank_init.
What does test_listwise_rerank.py depend on?
test_listwise_rerank.py imports 3 module(s): langchain_classic.retrievers.document_compressors.listwise_rerank, langchain_openai, pytest.
Where is test_listwise_rerank.py in the architecture?
test_listwise_rerank.py is located at libs/langchain/tests/unit_tests/retrievers/document_compressors/test_listwise_rerank.py (domain: LangChainCore, subdomain: ApiManagement, directory: libs/langchain/tests/unit_tests/retrievers/document_compressors).

Analyze Your Own Codebase

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

Try Supermodel Free