client icon indicating copy to clipboard operation
client copied to clipboard

[Enhancement] streaming support for assistant api

Open mgalinskiSaticon opened this issue 11 months ago • 5 comments

As opposed in the following Q&A, OpenAI has published the support for Message Streaming for the Assistant API, which has been documented. As such I want to open an issue for it.

Q&A Message: Originally posted by @eng-ahmad-sameer in https://github.com/openai-php/client/discussions/351

OpenAI Assistant Streaming Documentation https://platform.openai.com/docs/api-reference/assistants-streaming

mgalinskiSaticon avatar Mar 18 '24 14:03 mgalinskiSaticon

I was thinking of opening the same thing and was looking at the other completion stream implementations to try and implement myself but didn't make much progress. Would love this feature to be added

slaven-ii avatar Mar 19 '24 10:03 slaven-ii

Need this feature for my project too. I'm looking forward to it

olPdy avatar Mar 22 '24 22:03 olPdy

Is anyone already working on the feature? Is there anything I can do to help?

gerdemann avatar Mar 26 '24 13:03 gerdemann

Just created a PR for this, It maps each event onto the correct object classes. So you can loop through the stream and perform whichever actions you want at each event.

Im fairly sure its feature complete, but let me know if anything might be missing from it. Its working fine on my project so far.

EthanBarlo avatar Apr 02 '24 13:04 EthanBarlo

+1 for streaming assistant support pretty, pretty please.

CaptainHilly avatar May 03 '24 01:05 CaptainHilly

Any updates on it. We are blocked due to not having this feature.

Thanks, Sarathi

sarathisahoo-muffins avatar May 16 '24 09:05 sarathisahoo-muffins

Implemented in the latest release: https://github.com/openai-php/client/releases/tag/v0.9.0

gehrisandro avatar May 21 '24 19:05 gehrisandro