Open joe-yeomans opened 4 days ago
Thanks so much for the in depth bug report! I'll do some investigating
I did some more digging and found this:
When adding a print statement in packages/ssestream/stream.go
on line 71:
for s.scn.Scan() {
txt := s.scn.Bytes()
fmt.Println("txt: ", string(txt))
I get the following output:
txt: event: thread.run.step.completed
txt: event: done
txt: data: [DONE]
So it looks like it's completing the stream straight away.
I've come across an issue when submitting toll outputs and streaming the response back to the client. The stream just seems to end straight away and doesn't send any data back. Alternatively, when I submit the tool outputs via a standard http call, the responses stream back just fine.
This is the tool output I'm sending back, this is just test data so feel free to use it. products.json
This is the code I use to submit the tool outputs using the SDK:
There is no error from the stream, it just ends straight away.
This is the http code I'm using where the streaming works:
I'm not sure what other information you'd require, but if you do need anything else please let me know. I'm happy to help out.