-
Notifications
You must be signed in to change notification settings - Fork 105
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
Where to add config to streamEvents
?
#318
Comments
In the second positional location (where version is passed) Here's the ref doc for streamEvents. options extends RunnableConfig, which contains the configuration values you're looking for. It also contains info about the differences between the versions. We version the endpoints explicitly since streamEvents returns all the sub-events. Streaming is critical for any application, and we plan to make some improvements to tracing in the future that might influence some of the characteristics of those events. Things that would influence these characteristics would be scoped to a new version. |
Perhaps somewhat related, but how would I limit only the last node to stream to a response client? If I have several nodes and each node invokes a chain, currently I'm seeing on_chat_model_stream events for all chains and I only want to forward on chunks from the last generation node. |
Thanks @hinthornw Can you just confirm this is how it is supposed to work?
@justinlevi see this js example for your answer: https://langchain-ai.github.io/langgraphjs/how-tos/stream-tokens/#other-graphs |
So the confusing was caused by the fact that I get an error when using Claude in my LangGraph in combination with streamEvents. When changing to GPT4o the streaming is working. This is the error I get:
I am using a Zod schema with the structuredoutput:
Is this a bug? |
do you have a langsmith trace to share? |
Maybe a stupid question, but I can't find it in the docs.
If I want to add a thread_id to a final response of a graph (specific node), how to add this thread id as config?
And why do you need to use version v1 or v2?
The text was updated successfully, but these errors were encountered: