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]: Allow any module to emit a custom event #6282

Merged
merged 2 commits into from
Aug 1, 2024

Conversation

jacoblee93
Copy link
Collaborator

@jacoblee93 jacoblee93 commented Jul 30, 2024

Using:

await runManager?.handleCustomEvent("some_test_event", {
  someval: true,
});

Some concerns about misuse but I think generally useful as an escape hatch.

CC @afirstenberg

Copy link

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

@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 30, 2024
@jacoblee93 jacoblee93 requested a review from eyurtsev July 30, 2024 21:05
@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Jul 30, 2024
@eyurtsev
Copy link
Contributor

eyurtsev commented Aug 1, 2024

I'm not convinced that this makes sense given that it creates a 2nd way to do the same thing, but in a way that works in fewer cases. The current dispatch API is able to figure out what is the correct parent id context without requiring a run manager to be passed explicitly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases lgtm PRs that are ready to be merged as-is size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants