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

core: Add Ellipsis ... syntax support for implicit RunnablePassthrough #29570

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

m7mdhka
Copy link

@m7mdhka m7mdhka commented Feb 4, 2025

  • PR message: Delete this entire checklist and replace with
    • Description: Adds support for using Python's Ellipsis (...) as shorthand for RunnablePassthrough() in LCEL chains. Enables cleaner syntax:
    chain = retriever | prompt | llm | {"passthrough": ..., "somerunnable": lambda_runnable}
    
      chain = (
        ...
        | llm
        | {
            "A": ...,
            "b": ...
        }
    )
    
    • Dependencies: None
    • Twitter handle: @m7md_hka

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 4, 2025
Copy link

vercel bot commented Feb 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Feb 4, 2025 1:20am

@dosubot dosubot bot added the 🤖:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs label Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:nit Small modifications/deletions, fixes, deps or improvements to existing code or docs size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
Status: Triage
Development

Successfully merging this pull request may close these issues.

1 participant