azure-search-openai-demo
azure-search-openai-demo copied to clipboard
Error:TypeError: Cannot read properties of undefined (reading '0')
Please provide us with the following information:
I am getting this error while running the code using existing infrastructure- TypeError: Cannot read properties of undefined (reading '0')
After investigation i found that it is giving issue on api.ts call. Please find below screen shot.
This issue is for a: (mark with an 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
Any log messages given by the failure
Expected/desired behavior
OS and Version?
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
azd version?
run
azd versionand copy paste here.
Versions
Mention any other details that might be useful
Thanks! We'll be in touch soon.
Did you also check it by running it locally? if you did can you share default-docker.log file
Seems it is releted to the part- Enabling CORS for an alternate frontend By default, the deployed Azure web app will only allow requests from the same origin. To enable CORS for a frontend hosted on a different origin, run:
Run azd env set ALLOWED_ORIGIN https://<your-domain.com> Run azd up For the frontend code, change BACKEND_URI in api.ts to point at the deployed backend URL, so that all fetch requests will be sent to the deployed backend.
Can you please tell me how to give backend uri in api.ts
@pamelafox Could you please explain us how to use existing open ai for the backend.I want used existing open ai which is in different group- OPENAI_API_TYPE = "azure" OPENAI_API_VERSION = "2023-07-01-preview" OPENAI_API_KEY = "xxxxxx" OPENAI_API_BASE = " https://openaxxxx.openai.azure.com/" DEPLOYMENT_NAME = "gpt-4-32k" # 60K TPM
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this issue will be closed.