test_fixed_message_response_when_docs_founda() — langchain Function Reference
Architecture documentation for the test_fixed_message_response_when_docs_founda() function in test_conversation_retrieval.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6516e65b_64c8_d2ea_ff95_15c1f5c4d1b8["test_fixed_message_response_when_docs_founda()"] 995a7073_bf4f_3e52_1d5f_85841e01cccc["test_conversation_retrieval.py"] 6516e65b_64c8_d2ea_ff95_15c1f5c4d1b8 -->|defined in| 995a7073_bf4f_3e52_1d5f_85841e01cccc style 6516e65b_64c8_d2ea_ff95_15c1f5c4d1b8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/chains/test_conversation_retrieval.py lines 38–62
async def test_fixed_message_response_when_docs_founda() -> None:
fixed_resp = "I don't know"
answer = "I know the answer!"
llm = FakeListLLM(responses=[answer])
retriever = SequentialRetriever(
sequential_responses=[[Document(page_content=answer)]],
)
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 == answer
assert got["answer"] == answer
Domain
Subdomains
Source
Frequently Asked Questions
What does test_fixed_message_response_when_docs_founda() do?
test_fixed_message_response_when_docs_founda() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/chains/test_conversation_retrieval.py.
Where is test_fixed_message_response_when_docs_founda() defined?
test_fixed_message_response_when_docs_founda() is defined in libs/langchain/tests/unit_tests/chains/test_conversation_retrieval.py at line 38.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free