Skip to content
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

Potential bug in Context Runnable #18741

Closed
1 task done
eyurtsev opened this issue Mar 7, 2024 · 2 comments
Closed
1 task done

Potential bug in Context Runnable #18741

eyurtsev opened this issue Mar 7, 2024 · 2 comments
Assignees
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: Runnables Related to Runnables

Comments

@eyurtsev
Copy link
Collaborator

eyurtsev commented Mar 7, 2024

Privileged issue

  • I am a LangChain maintainer, or was asked directly by a LangChain maintainer to create an issue here.

Issue Content

Minimal reproduction

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)
@eyurtsev
Copy link
Collaborator Author

eyurtsev commented Mar 7, 2024

@eyurtsev
Copy link
Collaborator Author

eyurtsev commented Mar 7, 2024

investigate if related to: langchain-ai/langgraph#136

@eyurtsev eyurtsev self-assigned this Mar 7, 2024
@dosubot dosubot bot added Ɑ: Runnables Related to Runnables 🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Mar 7, 2024
eyurtsev added a commit that referenced this issue Mar 14, 2024
bechbd pushed a commit to bechbd/langchain that referenced this issue Mar 29, 2024
gkorland pushed a commit to FalkorDB/langchain that referenced this issue Mar 30, 2024
hinthornw pushed a commit that referenced this issue Apr 26, 2024
hinthornw pushed a commit that referenced this issue Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:bug Related to a bug, vulnerability, unexpected error with an existing feature Ɑ: Runnables Related to Runnables
Projects
None yet
Development

No branches or pull requests

1 participant