mirror of
https://github.com/hwchase17/langchain
synced 2024-11-04 06:00:26 +00:00
[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:
parent
6705928b9d
commit
13ccf202de
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user