This method creates a new UpstashVector instance from an array of Document instances.
fromDocuments(
docs: DocumentInterface<Record<string, any>>[],
embeddings: EmbeddingsInterface,
dbConfig: UpstashVectorLibArgs
): Promise<UpstashVectorStore>| Name | Type | Description |
|---|---|---|
docs* | DocumentInterface<Record<string, any>>[] | The docs to be added to Upstash database. |
embeddings* | EmbeddingsInterface | Embedding interface of choice, to create the embeddings. |
dbConfig* | UpstashVectorLibArgs | Object containing the Upstash database configs. |