Is it possible to stream text back from a tool call? #5347
Replies: 4 comments 1 reply
-
|
Update - so what I've ended up doing is creating a set of "global tools" that all my agents have access to. It's a tool call which has a description made up of the different Then, when loading my chat, I see if there is an With maxSteps set to quite high, this seems to work well! You might need some prompt tweaks, e.g. "Return to agent abc upon completion of your task" |
Beta Was this translation helpful? Give feedback.
-
|
@matthew-gill I need something similar as I try to build Agent Swarm. Are you able to share sample code? |
Beta Was this translation helpful? Give feedback.
-
|
I'm interested to hear more too :) |
Beta Was this translation helpful? Give feedback.
-
|
In V4, you can use You can also use data parts (V5) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using
streamTextto power a chat app. For one of my tools, I want to hand off to another LLM to generate the tool response.I'd like to be able to stream the output of the tool to the front end as it's generating, but I can't seem to get it to work.
I've created an example below just to illustrate the issue (I know in this case, a tool call is unnecessary).
Obviously I can
awaitthe response within the tool call, but there's a delay while the LLM is generating.I'd like to avoid a client side request if at all possible.
Any ideas if it's possible to stream the result back to the user? TIA!
Beta Was this translation helpful? Give feedback.
All reactions