Static method to create a new OpenSearchVectorStore from an array of Documents, embeddings, and OpenSearch client arguments.
fromDocuments(
docs: Document<Record<string, any>>[],
embeddings: EmbeddingsInterface,
dbConfig: OpenSearchClientArgs
): Promise<OpenSearchVectorStore>| Name | Type | Description |
|---|---|---|
docs* | Document<Record<string, any>>[] | The documents to be added to the OpenSearch index. |
embeddings* | EmbeddingsInterface | The embeddings used to convert the documents into vectors. |
dbConfig* | OpenSearchClientArgs | The OpenSearch client arguments. |