mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-16 18:13:54 +00:00
Fixing inconsistency (#926)
Fixing inconsistency between pipe and p in the doc
This commit is contained in:
parent
1244d16010
commit
55b7a820d4
@ -70,13 +70,13 @@ Or you can add decision nodes where only one "branch" is executed afterwards. Th
|
|||||||
else:
|
else:
|
||||||
return (kwargs, "output_2")
|
return (kwargs, "output_2")
|
||||||
|
|
||||||
pipe = Pipeline()
|
p = Pipeline()
|
||||||
pipe.add_node(component=QueryClassifier(), name="QueryClassifier", inputs=["Query"])
|
p.add_node(component=QueryClassifier(), name="QueryClassifier", inputs=["Query"])
|
||||||
pipe.add_node(component=es_retriever, name="ESRetriever", inputs=["QueryClassifier.output_1"])
|
p.add_node(component=es_retriever, name="ESRetriever", inputs=["QueryClassifier.output_1"])
|
||||||
pipe.add_node(component=dpr_retriever, name="DPRRetriever", inputs=["QueryClassifier.output_2"])
|
p.add_node(component=dpr_retriever, name="DPRRetriever", inputs=["QueryClassifier.output_2"])
|
||||||
pipe.add_node(component=JoinDocuments(join_mode="concatenate"), name="JoinResults",
|
p.add_node(component=JoinDocuments(join_mode="concatenate"), name="JoinResults",
|
||||||
inputs=["ESRetriever", "DPRRetriever"])
|
inputs=["ESRetriever", "DPRRetriever"])
|
||||||
pipe.add_node(component=reader, name="QAReader", inputs=["JoinResults"])
|
p.add_node(component=reader, name="QAReader", inputs=["JoinResults"])
|
||||||
res = p.run(query="What did Einstein work on?", top_k_retriever=1)
|
res = p.run(query="What did Einstein work on?", top_k_retriever=1)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user