test_spliting_answer_into_answer_and_sources() — langchain Function Reference
Architecture documentation for the test_spliting_answer_into_answer_and_sources() function in test_qa_with_sources.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD bf61fd7a_c048_b86c_4bf1_b18ad7108f80["test_spliting_answer_into_answer_and_sources()"] ef7aa2f3_ca98_9dc0_1635_97dbc913c740["test_qa_with_sources.py"] bf61fd7a_c048_b86c_4bf1_b18ad7108f80 -->|defined in| ef7aa2f3_ca98_9dc0_1635_97dbc913c740 style bf61fd7a_c048_b86c_4bf1_b18ad7108f80 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/chains/test_qa_with_sources.py lines 86–94
def test_spliting_answer_into_answer_and_sources(
text: str,
answer: str,
sources: str,
) -> None:
qa_chain = QAWithSourcesChain.from_llm(FakeLLM())
generated_answer, generated_sources = qa_chain._split_sources(text)
assert generated_answer == answer
assert generated_sources == sources
Domain
Subdomains
Source
Frequently Asked Questions
What does test_spliting_answer_into_answer_and_sources() do?
test_spliting_answer_into_answer_and_sources() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/chains/test_qa_with_sources.py.
Where is test_spliting_answer_into_answer_and_sources() defined?
test_spliting_answer_into_answer_and_sources() is defined in libs/langchain/tests/unit_tests/chains/test_qa_with_sources.py at line 86.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free