-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
streamEvents does not properly work on RemoteRunnable #5309
Comments
It appears you're encountering an issue where the The difference between This issue might be related to a version mismatch or a bug in the LangChain.js version you're using (0.1.36). However, there's no known issue related to this in the version you mentioned. Another potential cause could be compatibility with your Node.js version (21.5.0). LangChain.js tests are run on Node.js versions 18.x and 20.x, so using a version within this range might avoid compatibility issues. If the problem persists, providing more details about the error messages or the exact output when calling
|
@dosu can you confirm that RemoteRunnable should have full support for streamEvents and it should include all the events from the sub-runnables from the remote runnable? |
@dosu in what circumstances one cannot use streamEvents or it is unfeasible to use it? |
Yes, Regarding the circumstances where
It's important to ensure that your
|
@dosu i am pretty sure we are onto something. When remote chain is RunnableSequence, its sub-runnables will not be included in the streamEvents, and only events with name==RunnableSequence will be streamed. how one can target the inner rrunnables of RunnableSequence, when the sequence chain is exposed as langserve remote runnable and consumed in JS? |
To target the inner runnables of a Here's a more detailed approach to ensure you capture events from sub-runnables:
By following these steps, you should be able to capture and process events from all sub-runnables within a If you're still facing issues or have specific questions about implementing this in your project, feel free to provide more details or ask for further clarification.
|
@dosu you tripped into the vague mumbo jumbo tell me details about implementation of streamEvents for RunnableSequence so i can understand its limitations |
The When a The issue of hitting the This detailed explanation aims to clarify the implementation and limitations of
|
@dosu it is still not helpful. search for code that implements streamEvents for RunnableSequence and explain to me step by step how it works |
The implementation of
Regarding the specific issue of hitting the If you're encountering issues with streaming events from sub-runnables or if the events are not being streamed as expected, reviewing the specific implementation details of the
|
I have this issue as well with an |
Checked other resources
Example Code
Chain
LangServe app
RemoteRunnable#streamEvents in JS
Expected this code to produce stream of events that one can expect from streamEvents and a POST request to /stream_events, but it hits POST /stream and the event stream/response looks like a regular stream response that uses SSE.
This code properly streams all the events, proving that the chain itself is streamable.
Error Message and Stack Trace (if applicable)
No response
Description
streamEvents called on RemoteRunnable does not seem to properly stream the events and instead posts regular /stream endpoint.
The chain is streamable for sure (verified in python).
I also noticed that the chain.streamEvents function definition that i inspect on real chain instance in the browser debug console does not look like the definition i verify in code, but instead looks like the definition for Runnable._streamEvents:
chain.streamEvents
Runnable._streamEvents
RemoteRunnable.streamEvents
System Info
pnpm show langchain
Platform: Linux
Node: v21.5.0
pnpm: 8.14.1
The text was updated successfully, but these errors were encountered: