forked from Archives/langchain
Harrison/opensearch vectorstore (#1907)
Co-authored-by: Mehmet Öner Yalçın <oneryalcin@gmail.com>
This commit is contained in:
parent
ea142f6a32
commit
eec9b1b306
@ -363,7 +363,11 @@ class OpenSearchVectorSearch(VectorStore):
|
||||
embeddings = embedding.embed_documents(texts)
|
||||
_validate_embeddings_and_bulk_size(len(embeddings), bulk_size)
|
||||
dim = len(embeddings[0])
|
||||
index_name = uuid.uuid4().hex
|
||||
# Get the index name from either from kwargs or ENV Variable
|
||||
# before falling back to random generation
|
||||
index_name = get_from_dict_or_env(
|
||||
kwargs, "index_name", "OPENSEARCH_INDEX_NAME", default=uuid.uuid4().hex
|
||||
)
|
||||
is_appx_search = _get_kwargs_value(kwargs, "is_appx_search", True)
|
||||
if is_appx_search:
|
||||
engine = _get_kwargs_value(kwargs, "engine", "nmslib")
|
||||
|
Loading…
Reference in New Issue
Block a user