RunnableParallel in LCEL #17155
mail2mhossain
started this conversation in
General
Replies: 0 comments
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.
-
In the following code, does "results_1": arguments_for and "results_2": arguments_against run in parallel? If not then how could I do it?
Code:
chain = (
planner
| {
"results_1": arguments_for,
"results_2": arguments_against,
"original_response": itemgetter("base_response"),
}
| final_responder
)
I am trying to use RunnableParallel here as follows:
chain = (
planner
| {
RunnableParallel(results_1=arguments_for),
RunnableParallel(results_1=arguments_for),
RunnableParallel(original_response=itemgetter("base_response")),
}
| final_responder
)
response = chain.invoke({"input": "scrum"}).
BUT getting error:
TypeError: unhashable type: 'RunnableParallel'
Beta Was this translation helpful? Give feedback.
All reactions