azure-search-openai-demo
azure-search-openai-demo copied to clipboard
Adding new documents and running search on those
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
Running prepdocs.py and trying to run index and search on new docs instead of provided sample docs.
Any log messages given by the failure
ImportError: cannot import name 'AsyncAzureOpenAI' from 'openai' (C:\Users\xxxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openai_init_.py)
Expected/desired behavior
I was expecting to see indexes created and some operations performed in Open AI search service but both document intelligence and search services are empty and getting this error.
OS and Version?
Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) Windows 10. Solution deployed through VS code
azd version?
run
azd versionand copy paste here. azd version 1.5.1
Versions
Mention any other details that might be useful
Instead of uploading PDF files to data folder, if I keep files on storage account created by azd up, can I still run prepdocs.py directly or any other steps I will have to take for ingestion and search. Thanks !
Thanks! We'll be in touch soon.
There's an integrated vectorization PR coming in that means you won't have to re-run prepdocs every time you see new documents
#1159
Regarding this error
ImportError: cannot import name 'AsyncAzureOpenAI' from 'openai' (C:\Users\xxxxxxxx\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\openai_init_.py)
Can you please try running pip install -r requirements-dev.txt? Looks like you are not using the virtualenv with the right packages installed