mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-11-02 18:59:28 +00:00
Fix RouteDocuments documentation (#2380)
* fix RouteDocuments documentation * Update Documentation & Code Style Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
5b52690c5c
commit
fc1cb63bcc
@ -110,7 +110,7 @@ def __init__(split_by: str = "content_type", metadata_values: Optional[List[str]
|
||||
- `split_by`: Field to split the documents by, either `"content_type"` or a metadata field name.
|
||||
If this parameter is set to `"content_type"`, the list of `Document`s will be split into a list containing
|
||||
only `Document`s of type `"text"` (will be routed to `"output_1"`) and a list containing only `Document`s of
|
||||
type `"text"` (will be routed to `"output_2"`).
|
||||
type `"table"` (will be routed to `"output_2"`).
|
||||
If this parameter is set to a metadata field name, you need to specify the parameter `metadata_values` as
|
||||
well.
|
||||
- `metadata_values`: If the parameter `split_by` is set to a metadata field name, you need to provide a list
|
||||
|
@ -266,7 +266,7 @@ document_store.update_embeddings(retriever=retriever, update_existing_embeddings
|
||||
We are using one node for retrieving both texts and tables, the `TableTextRetriever`. In order to do question-answering on the Documents coming from the `TableTextRetriever`, we need to route Documents of type `"text"` to a `FARMReader` (or alternatively `TransformersReader`) and Documents of type `"table"` to a `TableReader`.
|
||||
|
||||
To achieve this, we make use of two additional nodes:
|
||||
- `SplitDocumentList`: Splits the List of Documents retrieved by the `TableTextRetriever` into two lists containing only Documents of type `"text"` or `"table"`, respectively.
|
||||
- `RouteDocuments`: Splits the List of Documents retrieved by the `TableTextRetriever` into two lists containing only Documents of type `"text"` or `"table"`, respectively.
|
||||
- `JoinAnswers`: Takes Answers coming from two different Readers (in this case `FARMReader` and `TableReader`) and joins them to a single list of Answers.
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@ class RouteDocuments(BaseComponent):
|
||||
:param split_by: Field to split the documents by, either `"content_type"` or a metadata field name.
|
||||
If this parameter is set to `"content_type"`, the list of `Document`s will be split into a list containing
|
||||
only `Document`s of type `"text"` (will be routed to `"output_1"`) and a list containing only `Document`s of
|
||||
type `"text"` (will be routed to `"output_2"`).
|
||||
type `"table"` (will be routed to `"output_2"`).
|
||||
If this parameter is set to a metadata field name, you need to specify the parameter `metadata_values` as
|
||||
well.
|
||||
:param metadata_values: If the parameter `split_by` is set to a metadata field name, you need to provide a list
|
||||
|
@ -1887,7 +1887,7 @@
|
||||
"We are using one node for retrieving both texts and tables, the `TableTextRetriever`. In order to do question-answering on the Documents coming from the `TableTextRetriever`, we need to route Documents of type `\"text\"` to a `FARMReader` (or alternatively `TransformersReader`) and Documents of type `\"table\"` to a `TableReader`.\n",
|
||||
"\n",
|
||||
"To achieve this, we make use of two additional nodes:\n",
|
||||
"- `SplitDocumentList`: Splits the List of Documents retrieved by the `TableTextRetriever` into two lists containing only Documents of type `\"text\"` or `\"table\"`, respectively.\n",
|
||||
"- `RouteDocuments`: Splits the List of Documents retrieved by the `TableTextRetriever` into two lists containing only Documents of type `\"text\"` or `\"table\"`, respectively.\n",
|
||||
"- `JoinAnswers`: Takes Answers coming from two different Readers (in this case `FARMReader` and `TableReader`) and joins them to a single list of Answers."
|
||||
]
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user