From f3c9bf5e4b64acf99f5e80b5d834b81718d0f398 Mon Sep 17 00:00:00 2001 From: Samuel ROZE Date: Wed, 12 Jul 2023 15:31:00 +0100 Subject: [PATCH] fix(typo): Clarify the point of `llm_chain` (#7593) Fixes a typo introduced in https://github.com/hwchase17/langchain/pull/7080 by @hwchase17. In the example (visible on [the online documentation](https://api.python.langchain.com/en/latest/chains/langchain.chains.conversational_retrieval.base.ConversationalRetrievalChain.html#langchain-chains-conversational-retrieval-base-conversationalretrievalchain)), the `llm_chain` variable is unused as opposed to being used for the question generator. This change makes it clearer. --- langchain/chains/conversational_retrieval/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/langchain/chains/conversational_retrieval/base.py b/langchain/chains/conversational_retrieval/base.py index 705c809195..21b13b3489 100644 --- a/langchain/chains/conversational_retrieval/base.py +++ b/langchain/chains/conversational_retrieval/base.py @@ -245,11 +245,11 @@ class ConversationalRetrievalChain(BaseConversationalRetrievalChain): ) prompt = PromptTemplate.from_template(template) llm = OpenAI() - llm_chain = LLMChain(llm=llm, prompt=prompt) + question_generator_chain = LLMChain(llm=llm, prompt=prompt) chain = ConversationalRetrievalChain( combine_docs_chain=combine_docs_chain, retriever=retriever, - question_generator=question_generator, + question_generator=question_generator_chain, ) """