microsoft / sample-app-aoai-chatGPT

Sample code for a simple web chat experience through Azure OpenAI, including Azure OpenAI On Your Data.
MIT License
1.59k stars 2.48k forks source link

Streaming of response didn't work #860

Closed stevenzhang114 closed 4 months ago

stevenzhang114 commented 4 months ago

Describe the bug The result will not be showed as "streaming" type of response when generating the answers, instead will just show "Generating answer..." , and then will show whole response at the end.

To Reproduce Steps to reproduce the behavior:

  1. Go to "Azure OpenAI studio" -> Chat playground
  2. Add data source
  3. Use "Deploy to" button to deploy a new web app
  4. Configure "AZURE_OPENAI_STREAM" variable to True
  5. Ask any questions

Expected behavior The answer should be showing as Streaming style like when testing in Chat playground in OpenAI studio

Screenshots If applicable, add screenshots to help explain your problem.

Configuration: Please provide the following

Additional context Add any other context about the problem here.