How to pass along a variable and then combine with multiple outputs #13415
brandonwilde
started this conversation in
General
Replies: 1 comment 2 replies
-
@brandonwilde Did you manage to do this? I am looking for a similar solution too.. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Is it possible to create a chain that (1) produces multiple named outputs and (2) also uses a RunnablePassthrough to pass its input unchanged to the subsequent Runnable/chain?
I'm running into a problem where the output of my (sub)chain eventually has to be assigned to a single variable name, which I would like to avoid for the sake of being able to handle variables separately. Below are two approaches I've found for implementing variable passthrough, but both methods also force me to store my
classify_chain
's output (a dictionary with multiple keys and values) as a single variable.The result in both cases is something like:
I would like to be get it in this form, however:
If I pipe the output of
classify_chain
directly into something else (i.e. I neglect the passthrough), then the multiple outputs ofclassify_chain
are treated as separate input variables to the next Runnable, as I'd like. It's only when I need to combine it with a passthrough that I become constrained.Hopefully there's something simple I'm missing. I'd love to hear if anyone knows a solution to this!
Beta Was this translation helpful? Give feedback.
All reactions