test_simplea() — langchain Function Reference
Architecture documentation for the test_simplea() function in test_conversation_retrieval.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 57d5cf9d_b5d3_cb1d_6e72_a3a6d7aa69ec["test_simplea()"] 995a7073_bf4f_3e52_1d5f_85841e01cccc["test_conversation_retrieval.py"] 57d5cf9d_b5d3_cb1d_6e72_a3a6d7aa69ec -->|defined in| 995a7073_bf4f_3e52_1d5f_85841e01cccc style 57d5cf9d_b5d3_cb1d_6e72_a3a6d7aa69ec fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/chains/test_conversation_retrieval.py lines 13–35
async def test_simplea() -> None:
fixed_resp = "I don't know"
answer = "I know the answer!"
llm = FakeListLLM(responses=[answer])
retriever = SequentialRetriever(sequential_responses=[[]])
memory = ConversationBufferMemory(
k=1,
output_key="answer",
memory_key="chat_history",
return_messages=True,
)
qa_chain = ConversationalRetrievalChain.from_llm(
llm=llm,
memory=memory,
retriever=retriever,
return_source_documents=True,
rephrase_question=False,
response_if_no_docs_found=fixed_resp,
verbose=True,
)
got = await qa_chain.acall("What is the answer?")
assert got["chat_history"][1].content == fixed_resp
assert got["answer"] == fixed_resp
Domain
Subdomains
Source
Frequently Asked Questions
What does test_simplea() do?
test_simplea() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/chains/test_conversation_retrieval.py.
Where is test_simplea() defined?
test_simplea() is defined in libs/langchain/tests/unit_tests/chains/test_conversation_retrieval.py at line 13.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free