Find answers from the community

Updated 4 months ago

Anyone has ideas how to use

At a glance
Anyone has ideas how to use QueryPipeline with Routers? I haven't found any exmaple.

I have something like this:
qp = QueryPipeline(verbose=True)
qp.add_modules(
{
"input": InputComponent(),
"retriever": retriever,
"summarizer": summarizer,
}
)

qp.add_link("input", "retriever")
qp.add_link("retriever", "summarizer", dest_key="nodes")
qp.add_link("input", "summarizer", dest_key="query_str")


[0.9.47] - 2024-02-11
Last patch before v0.10!

New Features
add conditional links to query pipeline (#10520)
refactor conditional links + add to cookbook (#10544)
agent + query pipeline cleanups (#10563)
L
m
7 comments
Routers use conditional links, there should be an example somewhere in the docs
Basically based on the output of a module, you can conditionaly link to other nodukes
So you could have a selector, and passed on the output of that selector, link to the appropriate path
Hope that makes some sense lol
We need more examples! Thanks though!
haha yes -- the syntax is very new, we are still figuring it out as we go πŸ™‚
Add a reply
Sign up and join the conversation on Discord