Azure-Samples / azure-search-openai-demo

A sample app for the Retrieval-Augmented Generation pattern running in Azure, using Azure AI Search for retrieval and Azure OpenAI large language models to power ChatGPT-style and Q&A experiences.
https://azure.microsoft.com/products/search
MIT License
5.9k stars 4.04k forks source link

TypeError: Cannot read properties of undefined (reading 'content') #1860

Open suma-sai-paluri opened 1 month ago

suma-sai-paluri commented 1 month ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [ x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

I have deployed the application using existing resources, my sematic ranker service is a free subscription. After successfully deploying the application, the app is is not providing responses when the semantic ranker for retrieval is enabled. I tried few queries without enabling this feature, and the application runs fine without any errors.

Any log messages given by the failure

image

Expected/desired behavior

I have come across a post talking about this error ,but there is no solution provided. Can someone help me to solve this problem.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

vkr4773 commented 1 month ago

you need to login first. This error often comes when we use the auth but not logged in.

suma-sai-paluri commented 1 month ago

Thank you @vkr4773 for your response, can you please elaborate on what do you mean by "auth but not logged in" . I did not allow authentication in the application.

TaylorN15 commented 1 month ago

I also had this issue due to async content filtering being enabled. I changed this line to } else if (event["delta"] && event["delta"]["content"]) {

cforce commented 2 weeks ago

} else if (event["delta"] && event["delta"]["content"]) {

Can you elaborate a bit more ? Is is a bug? What do you mean with "async content filtering being enabled" `?

cforce commented 2 weeks ago

Related or dupe https://github.com/Azure-Samples/azure-search-openai-demo/issues/1895