From 02c35da445b5a8cbd3d47ba468243f9297795124 Mon Sep 17 00:00:00 2001 From: ZhangShenao <15201440436@163.com> Date: Mon, 5 Aug 2024 01:56:38 +0800 Subject: [PATCH] doc[Retriever] Enhance api docs for `MultiQueryRetriever` (#25035) Enhance api docs for `MultiQueryRetriever`: - Complete missing parameters - Unify parameter name --- libs/langchain/langchain/retrievers/multi_query.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libs/langchain/langchain/retrievers/multi_query.py b/libs/langchain/langchain/retrievers/multi_query.py index 23ba88e2a5343..8a96c0f5fb42b 100644 --- a/libs/langchain/langchain/retrievers/multi_query.py +++ b/libs/langchain/langchain/retrievers/multi_query.py @@ -72,6 +72,8 @@ def from_llm( Args: retriever: retriever to query documents from llm: llm for query generation using DEFAULT_QUERY_PROMPT + prompt: The prompt which aims to generate several different versions + of the given user query include_original: Whether to include the original query in the list of generated queries. @@ -95,7 +97,7 @@ async def _aget_relevant_documents( """Get relevant documents given a user query. Args: - question: user query + query: user query Returns: Unique union of relevant documents from all generated queries @@ -158,7 +160,7 @@ def _get_relevant_documents( """Get relevant documents given a user query. Args: - question: user query + query: user query Returns: Unique union of relevant documents from all generated queries