OvidijusParsiunas / deep-chat

Fully customizable AI chatbot component for your website
https://deepchat.dev
MIT License
1.26k stars 170 forks source link

Combination of streaming and mixedFiles not working #160

Open ki-zeitalter opened 2 months ago

ki-zeitalter commented 2 months ago

Hi there and first of all thank you for this fantastic component.

Currently I'm using version 1.4.11 and I'm trying to use file upload in combination with streaming responses. When I set mixedFiles and stream to true then the back-end is not able to parse the request correctly. I had a closer look at the RequestDetails and I saw that the content type was changed to "text/plain" instead of "multipart/formdata" when streaming is activated.

Am I doing something wrong here or is the combination not working?

OvidijusParsiunas commented 2 months ago

Hi @ki-zeitalter.

This was indeed a bug. I have fixed it in deep-chat-dev and deep-chat-react-dev packages version 9.0.158. These packages behave the same except their names are different. To note, we are preparing for a big release soon, and some of the properties are different. Such as request being called connect and the stream property being moved to connect. Nevertheless, everything is backwards compatible and you should be able to use the old properties as needed, but you will get console and TS warnings which you can ignore.

Let me know if this works for you. Thanks!

ki-zeitalter commented 2 months ago

Wow that was quick! It works indeed! Thanks alot!