[OpenSearch] : Fix AOSS Initialization (#8600)

### Description
This PR fixes the AOSS Initialization in Opensearch.

### Maintainers
@rlancemartin, @eyurtsev, @navneet1v

Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
This commit is contained in:
Naveen Tatikonda 2023-08-01 17:33:51 -05:00 committed by GitHub
parent 6705928b9d
commit 13ccf202de
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -336,13 +336,13 @@ class OpenSearchVectorSearch(VectorStore):
opensearch_url: str,
index_name: str,
embedding_function: Embeddings,
is_aoss: bool,
**kwargs: Any,
):
"""Initialize with necessary components."""
self.embedding_function = embedding_function
self.index_name = index_name
self.is_aoss = is_aoss
http_auth = _get_kwargs_value(kwargs, "http_auth", None)
self.is_aoss = _is_aoss_enabled(http_auth=http_auth)
self.client = _get_opensearch_client(opensearch_url, **kwargs)
@property
@ -781,4 +781,4 @@ class OpenSearchVectorSearch(VectorStore):
max_chunk_bytes=max_chunk_bytes,
is_aoss=is_aoss,
)
return cls(opensearch_url, index_name, embedding, is_aoss, **kwargs)
return cls(opensearch_url, index_name, embedding, **kwargs)