Skip to content

Commit c456cf0

Browse files
vectorstores[azure_search]: add additional_search_client_options to async Azure Search client (#50)
1 parent 018907e commit c456cf0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libs/community/langchain_community/vectorstores/azuresearch.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ def fmt_err(x: str) -> str:
263263
cors_options=cors_options,
264264
)
265265
index_client.create_index(index)
266+
266267
# Create the search client
267268
if not async_:
268269
return SearchClient(
@@ -358,6 +359,8 @@ def __init__(
358359
user_agent = "langchain"
359360
if "user_agent" in kwargs and kwargs["user_agent"]:
360361
user_agent += " " + kwargs["user_agent"]
362+
363+
# Create sync client
361364
self.client = _get_search_client(
362365
azure_search_endpoint,
363366
index_name,
@@ -375,6 +378,8 @@ def __init__(
375378
additional_search_client_options=additional_search_client_options,
376379
azure_credential=azure_credential,
377380
)
381+
382+
# Create async client
378383
self.async_client = _get_search_client(
379384
azure_search_endpoint,
380385
index_name,
@@ -390,6 +395,7 @@ def __init__(
390395
user_agent=user_agent,
391396
cors_options=cors_options,
392397
async_=True,
398+
additional_search_client_options=additional_search_client_options,
393399
azure_credential=azure_credential,
394400
azure_async_credential=azure_async_credential,
395401
)

0 commit comments

Comments
 (0)