-
Notifications
You must be signed in to change notification settings - Fork 84
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
Setting streaming to True doesn't seems to make any difference #217
Comments
I can look into it. |
Here seems the problem 0fe4dd9#diff-7b555324692cbefa47fc582ade684c4faa5d083023137e2839f37aff0401aa4eL832 It was probably done on purpose. I fixed it anyway in my case by extending langchain_core.tracers.event_stream._AstreamEventsCallbackHandler in my CallbackHandler |
Same issue mentioned here too: #134 (comment) |
@wuodar model = ChatBedrock(model_id=model_id, client=bedrock_client)
for chunk in model.stream("Hello, how are you?"):
print(chunk.content, end="", flush=True) For more info on streaming support in LangChain, see here. |
could you share your fix? |
Actually, I treat callback handler as a central place to forward messages to end user (e.g. WebSocket connection) so I'd like to stick to it |
|
Hi,
If I try to run following code:
The
on_llm_new_token
won't be called, even though I setstreaming
to True.But when i run this:
It works.
My question is why is that the case? I'm using langchain 3.0.0, before that, calling
invoke
withstreaming
equal toTrue
worked. Now it looks like I need to callstream
even if I setstreaming
parameter.It's confusing. Can anyone explain why is that the case?
The text was updated successfully, but these errors were encountered: