-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass parameter betweens each Runnables in a chain #504
Labels
Comments
4 tasks
Looking now |
Bug from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnablePassthrough, RunnableGenerator
from langchain_core.beta.runnables.context import Context
async def to_dict(input):
async for chunk in input:
yield {
'foo': chunk
}
chain = Context.setter('input') | model | to_dict | Context.getter('input')
async for chunk in chain.astream('hello'):
print(chunk) |
1 task
Issue will be tracked in LangChain since this is not a LangServe issue |
eyurtsev
added a commit
to langchain-ai/langchain
that referenced
this issue
Mar 8, 2024
…form (#18743) Automatic upgrade to transform and atransform Closes: #18741 langchain-ai/langgraph#136 langchain-ai/langserve#504
eyurtsev
added a commit
to langchain-ai/langchain
that referenced
this issue
Mar 14, 2024
…ict (#19051) Follow up on #18743 which missed RunnablePassthrough Issues: #18741 langchain-ai/langgraph#136 langchain-ai/langserve#504
gkorland
pushed a commit
to FalkorDB/langchain
that referenced
this issue
Mar 30, 2024
…form (langchain-ai#18743) Automatic upgrade to transform and atransform Closes: langchain-ai#18741 langchain-ai/langgraph#136 langchain-ai/langserve#504
gkorland
pushed a commit
to FalkorDB/langchain
that referenced
this issue
Mar 30, 2024
…ict (langchain-ai#19051) Follow up on langchain-ai#18743 which missed RunnablePassthrough Issues: langchain-ai#18741 langchain-ai/langgraph#136 langchain-ai/langserve#504
hinthornw
pushed a commit
to langchain-ai/langchain
that referenced
this issue
Apr 26, 2024
…form (#18743) Automatic upgrade to transform and atransform Closes: #18741 langchain-ai/langgraph#136 langchain-ai/langserve#504
hinthornw
pushed a commit
to langchain-ai/langchain
that referenced
this issue
Apr 26, 2024
…ict (#19051) Follow up on #18743 which missed RunnablePassthrough Issues: #18741 langchain-ai/langgraph#136 langchain-ai/langserve#504
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #479
Originally posted by shaojun February 22, 2024
Hi,
I have a
CustomUserType
input request, and there's a field ofshared_pass_through_parameter
that containsnon-nature language
data which would be used in any followedRunnables
(except theLLM
node).like the below sample code, the purpose of this field is to pass to final
RunnableLambda(output_process)
to output a customized content.Obvious that field will be dropped as it's not included into the output of
process
.I can see a solution that wrap all the route chain into a single function, but that will lose the feature of
streaming of LLM
.any suggestion?
The text was updated successfully, but these errors were encountered: