deep-chat icon indicating copy to clipboard operation
deep-chat copied to clipboard

Direct Connection Fails to Stream Response: OpenAI Assistance

Open 7h360df47h3r opened this issue 1 year ago • 4 comments

I am encountering an issue when using direct connection using OpenAI API Assistants where this fails to stream the response despite property stream being set to true within the DeepChat component.

Documentation for your reference: https://platform.openai.com/docs/api-reference/assistants-streaming

Thanks in advance for your help!

7h360df47h3r avatar Mar 30 '24 12:03 7h360df47h3r

Hi @7h360df47h3r.

Thankyou for raising this issue. The Assistants stream API is definitely new and I was not aware that it was released, hence to-date I have just been recommending developers to use stream simulation instead.

This is very cool and I'll see what I can do to implement it for the next release.

I'll update you on the progress!

OvidijusParsiunas avatar Mar 30 '24 16:03 OvidijusParsiunas

I have started to do the work for the streaming API, but it may take me a couple of days to get it all working as it is quite complex and my time these couple of days is unfortunately limited due to UK holidays.

I'll update you on the progress.

OvidijusParsiunas avatar Mar 30 '24 18:03 OvidijusParsiunas

No worries, it's great that you've already started digging into it.

Enjoy the holidays! You've earned it. Looking forward to touching base once you're back at it.

7h360df47h3r avatar Mar 30 '24 19:03 7h360df47h3r

Hey, think I got it to work. I have published the code in deep-chat-dev and deep-chat-react-dev versions 9.0.156. These packages work exactly like the main ones except their names are different. You may also notice a few API changes, such as the stream property being moved to connect - which is the new request. Nevertheless, everything is backwards compatible and the old properties should work just fine - although you will get a few console/ts warnings that can be ignored.

The changes will be published in the next release which will happen in the next couple of weeks. Let me know if you have any difficulties or issues in using the dev packages.

Thanks!

OvidijusParsiunas avatar Mar 31 '24 16:03 OvidijusParsiunas

Hi, the code mentioned in this issue has now been released in Deep Chat version 2.0.0.

OvidijusParsiunas avatar Jul 16 '24 12:07 OvidijusParsiunas