This method creates a new UpstashVector instance from an array of texts. The texts are initially converted to Document instances and added to Upstash database.
fromTexts(
texts: string[],
metadatas: UpstashMetadata | UpstashMetadata[],
embeddings: EmbeddingsInterface,
dbConfig: UpstashVectorLibArgs
): Promise<UpstashVectorStore>| Name | Type | Description |
|---|---|---|
texts* | string[] | The texts to create the documents from. |
metadatas* | UpstashMetadata | UpstashMetadata[] | The metadata values associated with the texts. |
embeddings* | EmbeddingsInterface | Embedding interface of choice, to create the text embeddings. |
dbConfig* | UpstashVectorLibArgs | Object containing the Upstash database configs. |