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

feat(js): automatic handoff from Langchain RunnableLambda to traceable #874

Merged
merged 14 commits into from
Jul 18, 2024

Conversation

dqbd
Copy link
Collaborator

@dqbd dqbd commented Jul 16, 2024

We now share RunTree tracing context with LangChain, accompanying PR: langchain-ai/langchainjs#5992

To preserve the tracing context in LangChain, we store the child RunnableConfig in the extra[Symbol.for("lc:child_config")]. As it's a symbol, it won't be sent to LangSmith.

Before creating a child, we make sure that both parentRunId and runMap is appropriately updated when handing tracing from traceable to LangChain. The RunTree <-> LangChainTracer code has been moved to LangChain, however we still keep the code in langsmith/langchain for backwards compatibility.

@dqbd dqbd marked this pull request as ready for review July 16, 2024 22:09
@dqbd dqbd changed the title feat(js): transparent handoff vol. 2 feat(js): automatic handoff from Langchain RunnableLambda to traceable Jul 17, 2024
@dqbd dqbd merged commit 3be2b9a into main Jul 18, 2024
9 of 18 checks passed
@dqbd dqbd deleted the dqbd/transparent-handoff-vol2 branch July 18, 2024 20:36
agola11 added a commit to langchain-ai/langsmith-docs that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants