azure-search-openai-demo
azure-search-openai-demo copied to clipboard
AttributeError: SEMANTIC
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
The error appears when I try to run the application locally. I ran ./scripts/roles.ps1 and ./scripts/prepdocs.ps1 without problems, but when I send something through chat the error appears.
Any log messages given by the failure
ERROR:root:Exception in /chat Traceback (most recent call last): File "C:\Pessoal\Projetos\azure-search-openai-demo-back\backend_env\lib\site-packages\azure\search\documents_generated\models_search_client_enums.py", line 24, in getattr return cls.member_map[name.upper()] KeyError: 'SEMANTIC'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Pessoal\Projetos\azure-search-openai-demo-back\app.py", line 116, in chat r = impl.run(request.json["history"], request.json.get("overrides") or {}) File "C:\Pessoal\Projetos\azure-search-openai-demo-back\approaches\chatreadretrieveread.py", line 74, in run query_type=QueryType.SEMANTIC, File "C:\Pessoal\Projetos\azure-search-openai-demo-back\backend_env\lib\site-packages\azure\search\documents_generated\models_search_client_enums.py", line 26, in getattr raise AttributeError(name) AttributeError: SEMANTIC SEMANTIC 127.0.0.1 - - [25/Jun/2023 21:08:49] "POST /chat HTTP/1.1" 500 - INFO:werkzeug:127.0.0.1 - - [25/Jun/2023 21:08:49] "POST /chat HTTP/1.1" 500 -
Expected/desired behavior
OS and Version?
Windows 11
azd version?
azd version 1.0.2
Versions
Python 3.10.11
are you working behind a corporate fire wall ?
I am having the same issue.
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.
I'm guessing this was due to having an older version of the Azure Cognitive Search package, as I'm not sure why SEMANTIC would be missing. Please check your package version using pip freeze if this happens to you. Closing for now.