From f88ffdda4f76cb9e4dc2fbc08bb8d6b4e2ef43ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9mence=20Lesn=C3=A9?= Date: Wed, 20 Nov 2024 22:06:54 +0100 Subject: [PATCH] fix: AI Search implem after update --- app/persistence/ai_search.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,