goose icon indicating copy to clipboard operation
goose copied to clipboard

feat: stream LLM responses

Open jamadeo opened this issue 6 months ago • 1 comments

Only databricks provider to start, but should not be hard to do this for others that support streaming.

https://github.com/user-attachments/assets/6fa08fc9-38cb-4b68-a336-7093d2614650

jamadeo avatar May 27 '25 15:05 jamadeo

@jamadeo looks really great - but there is a bug where it seems to not call tools correctly image so may need to chase that down

michaelneale avatar May 28 '25 01:05 michaelneale

@jamadeo looks really great - but there is a bug where it seems to not call tools correctly

Thanks @michaelneale, forgot to mention here but I fixed this issue. My first stab didn't re-assemble streamed tool call messages (they are chunked too), but I've since added it.

jamadeo avatar Jun 30 '25 16:06 jamadeo

Thanks @baxen for the review! I actually effectively reverted the subagent change because it doesn't really help anything to use streaming in that context. If we, in the future, want to show partial text responses from models to subagents in a streamed way we can think about it then, but no reason to fit it in now.

jamadeo avatar Jul 03 '25 02:07 jamadeo

@jamadeo oops thought it would be an easier merge than that to update it, but looking good. Sorry have slightly broken it (looking at it) - feel free to yank that last merge if it is all broken and not fixed by your morning time.

michaelneale avatar Jul 07 '25 05:07 michaelneale

I think some work still needed:

image

using databricks, when it finishes streaming never goes back to the prompt (even if I press enter)

michaelneale avatar Jul 09 '25 23:07 michaelneale

have been testing this with CLI + databricks and seems ✅

michaelneale avatar Jul 10 '25 06:07 michaelneale