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.79k stars 3.93k forks source link

Azure AI Search API version 2023-07-01-Preview being retired #1805

Closed kzankpe closed 1 month ago

kzankpe commented 1 month ago

Please provide us with the following information:

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

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

Sorry if this question has already been answered. I have migrated the Azure search (index) to a newer API version as the "Azure AI Search API Version 2023-07-01-Preview is being retired on 8 July 2024" Are there any modifications regarding the code and the python packages? I wasn't able to find where the API version is specified in the code. I am afraid if i redeploy the code again from scratch or create a new index in the Azure search resource, the deprecated API version will be used. Please can you help me clear up this question? Thank you.

cforce commented 1 month ago

@kzankpe May I ask how you did the migration between the two Ature search instances ?

kzankpe commented 1 month ago

Hello @cforce . I use this documentation here. The migration was done through Azure Portal. There was a migrate button available on the index.

cforce commented 1 month ago

I meant copy index data from different source index even from another subscription to new created azure index resources somewhere else

mattgotteiner commented 1 month ago

Data migration is not a supported feature in Azure Search

You can try 1 of the following samples which do support moving data from another search service. Please note that these samples have limitations

https://github.com/Azure-Samples/azure-search-dotnet-utilities/tree/main/export-data

https://learn.microsoft.com/en-us/samples/azure-samples/azure-search-dotnet-utilities/azure-search-backup-restore-index/

mattgotteiner commented 1 month ago

Ah, if you are just trying to update your index you do not need to migrate any data

https://learn.microsoft.com/en-us/azure/search/search-api-migration#upgrade-from-2023-07-01-preview

There is no reindexing required here

mattgotteiner commented 1 month ago

https://github.com/Azure-Samples/azure-search-openai-demo/blob/d34fec0e3d02b02552912442e09c900b772de407/app/backend/requirements.txt#L53

Here is where the Search SDK version is specified

https://github.com/Azure/azure-sdk-for-python/blob/4872214c1216b95a64b61422552d3ea2c67a7408/sdk/search/azure-search-documents/azure/search/documents/_api_versions.py It is not using 2023-07-01-Preview so you can redeploy the code and use a newer API version.

kzankpe commented 1 month ago

Hello @mattgotteiner thank you for your response and the resources. I will proceed to update the code to use the version of the azure-search-documents.