From bf8e3c6dd16b952a1ec385b3b642c3f104131277 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Thu, 15 Feb 2024 22:23:52 -0800 Subject: [PATCH] community[patch]: add fixes for AzureSearch after update to stable azure-search-documents library (#17599) - **Description:** Addresses the bugs described in linked issue where an import was erroneously removed and the rename of a keyword argument was missed when migrating from beta --> stable of the azure-search-documents package - **Issue:** https://github.com/langchain-ai/langchain/issues/17598 - **Dependencies:** N/A - **Twitter handle:** N/A --- libs/community/langchain_community/vectorstores/azuresearch.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/community/langchain_community/vectorstores/azuresearch.py b/libs/community/langchain_community/vectorstores/azuresearch.py index 6e4aed8d22c19..44455199961f5 100644 --- a/libs/community/langchain_community/vectorstores/azuresearch.py +++ b/libs/community/langchain_community/vectorstores/azuresearch.py @@ -91,6 +91,7 @@ def _get_search_client( SemanticField, SemanticPrioritizedFields, SemanticSearch, + VectorSearch, VectorSearchAlgorithmKind, VectorSearchAlgorithmMetric, VectorSearchProfile, @@ -255,7 +256,7 @@ def __init__( type=SearchFieldDataType.Collection(SearchFieldDataType.Single), searchable=True, vector_search_dimensions=len(self.embed_query("Text")), - vector_search_configuration="default", + vector_search_profile_name="myHnswProfile", ), SearchableField( name=FIELDS_METADATA,