mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-08-29 02:46:39 +00:00

* Add Pipeline.arun() * Sleeper node * Fix async running * Add e2e tests To run a Pipeline that doesn't have any async node in async mode: pytest e2e/pipelines/test_standard_pipelines.py::test_query_and_indexing_pipeline To run a Pipeline that has a single async node in concurrent mode: pytest e2e/pipelines/test_standard_pipelines.py::test_async_concurrent_complex_pipeline To run a Pipeline that has a single async node in sequential mode: pytest e2e/pipelines/test_standard_pipelines.py::test_async_sequential_complex_pipeline * Remove unused _adispatch_run method * Make Pipeline.run work with async nodes * Revert "Make Pipeline.run work with async nodes" This reverts commit 22d7a94e4d41aca1b59dad18c0b366fbb6e8f431. * Rename Pipeline.arun to Pipeline._arun * Enhance docstring * Add Sleeper docstring * Add release notes * ignore typing across the node * make pylint happy * skip pylint on needed unused import * fix * if a node has an arun method, use it --------- Co-authored-by: Massimiliano Pippi <mpippi@gmail.com>
61 lines
1.8 KiB
YAML
61 lines
1.8 KiB
YAML
# This pipeline has been automatically migrated to conform to Haystack 1.15.1.
|
|
# Please check that the pipeline is still working as expected.
|
|
# In this version: split by paragraphs, new prompt (simplified, opinions rather than facts)
|
|
|
|
version: "1.15.1"
|
|
|
|
components:
|
|
- name: DocumentStore
|
|
type: ElasticsearchDocumentStore
|
|
- name: BM25Retriever
|
|
type: BM25Retriever
|
|
params:
|
|
document_store: DocumentStore
|
|
top_k: 30
|
|
- name: JoinDocuments
|
|
type: JoinDocuments
|
|
params:
|
|
top_k_join: 30
|
|
join_mode: reciprocal_rank_fusion
|
|
- name: Reranker
|
|
type: SentenceTransformersRanker
|
|
params:
|
|
model_name_or_path: svalabs/cross-electra-ms-marco-german-uncased
|
|
top_k: 8
|
|
- name: QueryClassifier
|
|
type: TransformersQueryClassifier
|
|
params:
|
|
model_name_or_path: deepset/deberta-v3-base-injection
|
|
labels: ["LEGIT", "INJECTION"]
|
|
- name: qa_template
|
|
params:
|
|
output_parser:
|
|
type: AnswerParser
|
|
prompt: "Given this context answer the question:{new_line}\
|
|
'''{join(documents, delimiter=new_line, pattern='Rede[$idx], Datum: $date, Dies ist die Rede von: $politician_name (Partei: $faction): <$content>')}'''{new_line}\
|
|
Question: {query}{new_line}\
|
|
Answer: {new_line}"
|
|
type: PromptTemplate
|
|
- name: PromptNode
|
|
type: Sleeper
|
|
- name: FileTypeClassifier
|
|
type: FileTypeClassifier
|
|
- name: TextConverter
|
|
type: TextConverter
|
|
- name: PDFConverter
|
|
type: PDFToTextConverter
|
|
|
|
pipelines:
|
|
- name: query
|
|
nodes:
|
|
- name: QueryClassifier
|
|
inputs: [Query]
|
|
- name: BM25Retriever
|
|
inputs: [QueryClassifier.output_1]
|
|
- name: JoinDocuments
|
|
inputs: [BM25Retriever]
|
|
- name: Reranker
|
|
inputs: [JoinDocuments]
|
|
- name: PromptNode
|
|
inputs: [Reranker]
|