Skip to content

query pipelines with router #15852

Answered by dosubot bot
debarun-ghosh17 asked this question in Q&A
Sep 5, 2024 · 3 comments · 14 replies
Discussion options

You must be logged in to vote

To resolve the error and set the input keys correctly, you should use the InputKeys class to define the required and optional keys for each component. Here’s how you can do it:

  1. Define the Input and Output Keys for Each Pipeline: Use the InputKeys class to specify the required and optional keys.

  2. Wrap Each Pipeline in a Component: Create a wrapper component for each pipeline that conforms to the single input key requirement.

  3. Initialize the RouterComponent: Pass the wrapped components to the RouterComponent.

Here’s an example:

from llama_index.core.query_pipeline import RouterComponent, QueryPipeline, InputComponent
from llama_index.core.base_selector import BaseSelector
from llama_…

Replies: 3 comments 14 replies

Comment options

You must be logged in to vote
10 replies
@debarun-ghosh17
Comment options

@dosubot
Comment options

@debarun-ghosh17
Comment options

@dosubot
Comment options

Answer selected by debarun-ghosh17
@debarun-ghosh17
Comment options

@dosubot
Comment options

@debarun-ghosh17
Comment options

@dosubot
Comment options

Comment options

You must be logged in to vote
4 replies
@dosubot
Comment options

@debarun-ghosh17
Comment options

@dosubot
Comment options

@Chetan8000
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants