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[langsmith]: transparent handoff between @traceable HOF and LangChain #5339

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

dqbd
Copy link
Collaborator

@dqbd dqbd commented May 13, 2024

  • Upgrade to newest LangSmith 0.1.23
  • Transparent handoff between @Traceable and LangChain
  • Add LangSmith to langchain-core internals

Copy link

vercel bot commented May 13, 2024

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

Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2024 11:41pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 21, 2024 11:41pm

@dosubot dosubot bot added the lgtm PRs that are ready to be merged as-is label May 17, 2024
dqbd added a commit to langchain-ai/langsmith-sdk that referenced this pull request May 17, 2024
- Traceable to LangChain: add the entire tree of RunTrees into the
BaseTracer `runMap`, assign the `_parentRunId` to the callback manager
- LangChain to Traceable: the `RunnableTraceable` invokes the function
without calling `*WithConfig`, avoiding unwanted callback invocation


**Verifying package manager behaviour**

Exposed the LangChain utilities + added `@langchain/core` as an optional
dependency to allow supporting older versions of LangChain.

- [x] Yarn 1.x: does not install the `@langchain/core`, not included in
package-lock.json
- [X] PNPM: does not install `@langchain/core`, included in
package-lock.json
- [X] NPM: does not install `@langchain/core`, included in
package-lock.json
- [X] Bun: does not install `@langchain/core`, included in
package-lock.json
- [X] Deno: does not install `@langchain/core`

Upstream PR which implements similar functionality can be seen in
langchain-ai/langchainjs#5339

Closes #598
@dqbd dqbd force-pushed the dqbd/langsmith-traceable-handoff branch from b5d4410 to 0abfa3c Compare May 20, 2024 16:02
@dqbd dqbd marked this pull request as ready for review May 20, 2024 16:08
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features labels May 20, 2024
@@ -57,6 +60,40 @@ export class LangChainTracer
getEnvironmentVariable("LANGCHAIN_SESSION");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there! I noticed that the recent code changes in tracer_langchain.ts explicitly access an environment variable using the getEnvironmentVariable function. I've flagged this for your review to ensure it aligns with our environment variable usage guidelines. Keep up the great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features lgtm PRs that are ready to be merged as-is size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants