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.62k stars 2.53k forks source link

Issue with Truncated Responses in UI with Streaming ON #1131

Open gabrielsusai opened 1 week ago

gabrielsusai commented 1 week ago

Hi,

I'm working with the most recent code from GitHub. However, I've encountered an issue where the output response is cut off halfway through the completion. I'm linked to the Azure Search Service (OYD) and have set up the index properly. The chat does generate a response with the correct references, but it's truncated mid-way and fails to display correctly in the UI. GPT4 model is used. Below is my configuration.

[UPDATE] When AZURE_OPENAI_STREAM is set to True, the response gets truncated; when set to False, the data remains intact.

Chat with data: common settings DATASOURCE_TYPE=AzureCognitiveSearch SEARCH_TOP_K=5 SEARCH_STRICTNESS=3 SEARCH_ENABLE_IN_DOMAIN=True

Chat with data: Azure AI Search AZURE_SEARCH_SERVICE=service_name AZURE_SEARCH_INDEX=index_name AZURE_SEARCH_KEY=dummy AZURE_SEARCH_SEMANTIC_SEARCH_CONFIG=default AZURE_SEARCH_INDEX_IS_PRECHUNKED=False AZURE_SEARCH_TOP_K=5 AZURE_SEARCH_ENABLE_IN_DOMAIN=False AZURE_SEARCH_QUERY_TYPE=semantic AZURE_SEARCH_STRICTNESS=3

Any help would be appreciated.

Thanks

sarah-widder commented 16 hours ago

@gabrielsusai were you using the async content filter feature? If so, we had a bug specifically around the use of the filter with the On Your Data feature, which has now been fixed. Are you still seeing the issue?