mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-25 14:08:27 +00:00
Capitalize starting letter in params (#1750)
* Capitalize starting letter in params Capitalized the starting letter in code examples for params in keeping with the latest names for nodes where first letter is capitalized. Refer: https://github.com/deepset-ai/haystack/issues/1748 * Update standard_pipelines.py Capitalized some starting letters in the docstrings in keeping with the updated node names for standard pipelines
This commit is contained in:
parent
1a10de506c
commit
cf603042b2
@ -153,19 +153,19 @@ from haystack.pipeline import DocumentSearchPipeline, ExtractiveQAPipeline, Pipe
|
||||
|
||||
# Extractive QA
|
||||
qa_pipe = ExtractiveQAPipeline(reader=reader, retriever=retriever)
|
||||
res = qa_pipe.run(query="When was Kant born?", params={"retriever": {"top_k": 3}, "reader": {"top_k": 5}})
|
||||
res = qa_pipe.run(query="When was Kant born?", params={"Retriever": {"top_k": 3}, "Reader": {"top_k": 5}})
|
||||
|
||||
# Document Search
|
||||
doc_pipe = DocumentSearchPipeline(retriever=retriever)
|
||||
res = doc_pipe.run(query="Physics Einstein", params={"retriever": {"top_k": 3}})
|
||||
res = doc_pipe.run(query="Physics Einstein", params={"Retriever": {"top_k": 3}})
|
||||
|
||||
# Generative QA
|
||||
doc_pipe = GenerativeQAPipeline(generator=rag_generator, retriever=retriever)
|
||||
res = doc_pipe.run(query="Physics Einstein", params={"retriever": {"top_k": 3}})
|
||||
res = doc_pipe.run(query="Physics Einstein", params={"Retriever": {"top_k": 3}})
|
||||
|
||||
# FAQ based QA
|
||||
doc_pipe = FAQPipeline(retriever=retriever)
|
||||
res = doc_pipe.run(query="How can I change my address?", params={"retriever": {"top_k": 3}})
|
||||
res = doc_pipe.run(query="How can I change my address?", params={"Retriever": {"top_k": 3}})
|
||||
|
||||
```
|
||||
So to migrate your QA system from the deprecated `Finder` to `ExtractiveQAPipeline` you'd need to:
|
||||
|
||||
@ -119,7 +119,7 @@ class DocumentSearchPipeline(BaseStandardPipeline):
|
||||
debug: Optional[bool] = None):
|
||||
"""
|
||||
:param query: the query string.
|
||||
:param params: params for the `retriever` and `reader`. For instance, params={"retriever": {"top_k": 10}}
|
||||
:param params: params for the `retriever` and `reader`. For instance, params={"Retriever": {"top_k": 10}}
|
||||
:param debug: Whether the pipeline should instruct nodes to collect debug information
|
||||
about their execution. By default these include the input parameters
|
||||
they received and the output they generated.
|
||||
@ -185,7 +185,7 @@ class SearchSummarizationPipeline(BaseStandardPipeline):
|
||||
"""
|
||||
:param query: the query string.
|
||||
:param params: params for the `retriever` and `summarizer`. For instance,
|
||||
params={"retriever": {"top_k": 10}, "summarizer": {"generate_single_summary": True}}
|
||||
params={"Retriever": {"top_k": 10}, "Summarizer": {"generate_single_summary": True}}
|
||||
:param debug: Whether the pipeline should instruct nodes to collect debug information
|
||||
about their execution. By default these include the input parameters
|
||||
they received and the output they generated.
|
||||
@ -234,7 +234,7 @@ class FAQPipeline(BaseStandardPipeline):
|
||||
debug: Optional[bool] = None):
|
||||
"""
|
||||
:param query: the query string.
|
||||
:param params: params for the `retriever`. For instance, params={"retriever": {"top_k": 10}}
|
||||
:param params: params for the `retriever`. For instance, params={"Retriever": {"top_k": 10}}
|
||||
:param debug: Whether the pipeline should instruct nodes to collect debug information
|
||||
about their execution. By default these include the input parameters
|
||||
they received and the output they generated.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user