Static method to create a new CloseVectorNode instance from documents. It creates a new CloseVectorNode instance, adds the documents to it, then returns the instance.
fromDocuments(
docs: Document<Record<string, any>>[],
embeddings: EmbeddingsInterface,
args: Record<string, unknown>,
credentials: CloseVectorCredentials
): Promise<CloseVectorNode>| Name | Type | Description |
|---|---|---|
docs* | Document<Record<string, any>>[] | The documents to be added to the HNSWLib instance. |
embeddings* | EmbeddingsInterface | The embeddings to be used by the HNSWLib instance. |
args | Record<string, unknown> | An optional configuration object for the HNSWLib instance. |
credentials | CloseVectorCredentials | An optional credential object for the CloseVector API. |