azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

AttributeError: SEMANTIC

Open marceloricciardi opened this issue 2 years ago • 1 comments

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

Screenshot 2023-06-25 211940

marceloricciardi avatar Jun 26 '23 00:06 marceloricciardi

are you working behind a corporate fire wall ?

BitcoinCode avatar Jun 28 '23 09:06 BitcoinCode

I am having the same issue.

nileriver2323 avatar Jul 07 '23 21:07 nileriver2323

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.

github-actions[bot] avatar Sep 06 '23 01:09 github-actions[bot]

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.

pamelafox avatar Sep 07 '23 13:09 pamelafox