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[patch]: Require explicit override for callbacks within a nested config #5994

Merged
merged 8 commits into from
Jul 9, 2024

Conversation

jacoblee93
Copy link
Collaborator

Something like this seems like it should trace properly:

const lambda = RunnableLambda.from(async (input: string) => {
  const nestedLambda = RunnableLambda.from(
    async (input: string) => input);
  );
  const newConfig = {
    runId: "foo",
  }
  return nestedLambda.invoke(input, newConfig);
});

But it currently does not since newConfig will override existing callbacks, even though that is unlikely to be the user's intention.

This PR will load in any nested callbacks by default unless the passed config explicitly removes them.

CC @nfcampos

Copy link

vercel bot commented Jul 7, 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 Jul 9, 2024 5:08pm
langchainjs-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 9, 2024 5:08pm

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. auto:bug Related to a bug, vulnerability, unexpected error with an existing feature labels Jul 7, 2024
@jacoblee93 jacoblee93 requested a review from nfcampos July 7, 2024 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:bug Related to a bug, vulnerability, unexpected error with an existing feature size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant