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:
nishanthcgit 2021-11-15 17:08:13 +05:30 committed by GitHub
parent 1a10de506c
commit cf603042b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -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:

View File

@ -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.