diff --git a/app/persistence/ai_search.py b/app/persistence/ai_search.py index f3be334d..dc2de469 100644 --- a/app/persistence/ai_search.py +++ b/app/persistence/ai_search.py @@ -8,8 +8,8 @@ from azure.search.documents.aio import SearchClient from azure.search.documents.indexes.aio import SearchIndexClient from azure.search.documents.indexes.models import ( - AzureOpenAIParameters, AzureOpenAIVectorizer, + AzureOpenAIVectorizerParameters, HnswAlgorithmConfiguration, LexicalAnalyzerName, SearchableField, @@ -225,9 +225,9 @@ async def _use_client(self) -> SearchClient: ], vectorizers=[ AzureOpenAIVectorizer( - name="vectorizer-default", + vectorizer_name="vectorizer-default", # Without credentials specified, the database will use its system managed identity - azure_open_ai_parameters=AzureOpenAIParameters( + parameters=AzureOpenAIVectorizerParameters( deployment_id=self._config.embedding_deployment, model_name=self._config.embedding_model, resource_uri=self._config.embedding_endpoint,