Can I use astream_events like this? #31760
Replies: 1 comment
-
Hi @ivanzhu109! I'm Dosu and I’m helping the langchain team. Yes, your usage of A couple of caveats: not all providers support streaming tool calls, so behavior may vary depending on the underlying model [tool streaming docs]. Also, if you use Python ≤ 3.10 or custom runnables, make sure to propagate the config/callbacks to ensure events are emitted as expected [event streaming docs]. Your implementation is robust and idiomatic for the scenario you described. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Scenario:
When the ChatModel Node outputs tools, it returns the full parameters without streaming. When it outputs content, it uses streaming. The Tool Node directly returns the execution result.
Code example:
Beta Was this translation helpful? Give feedback.
All reactions