dify icon indicating copy to clipboard operation
dify copied to clipboard

fix: #148 message truncated

Open kense-lab opened this issue 2 years ago • 3 comments

kense-lab avatar May 23 '23 13:05 kense-lab

Can you provide an example of the processing that needs to be done? For instance, what is the data structure of the API's response? @kense-lab

iamjoel avatar May 23 '23 13:05 iamjoel

I am facing a similar issue. When I make a request to the /v1/chat-message API with the streaming option enabled, the response stream seems to be truncated accidentally, and this causes the failure in the JSON parsing process. This solution works for me. image

yuhao1118 avatar May 23 '23 15:05 yuhao1118

https://github.com/openai/openai-python/issues/399 I've noticed quite a few cases of stream returns being interrupted, it's probably related to the OpenAI issue, but it's hard to reproduce. If you guys find anything, can you send it to me so I can take a look?

takatost avatar May 23 '23 16:05 takatost