Create a new CouchbaseVectorStore from a set of texts. This function will convert each text and its corresponding metadata into a Document, initialize a new store, add the documents to it, and then return the store.
fromTexts(
texts: string[],
metadatas: any,
embeddings: EmbeddingsInterface,
config: CouchbaseSearchVectorStoreArgs
): Promise<CouchbaseSearchVectorStore>| Name | Type | Description |
|---|---|---|
texts* | string[] | The texts to be converted into Documents and added to the new store. |
metadatas* | any | The metadata for each text. If an array is passed, each text will have its corresponding metadata. If not, all texts will have the same metadata. |
embeddings* | EmbeddingsInterface | The embeddings to be used for the documents. |
config* | CouchbaseSearchVectorStoreArgs | The configuration for the new CouchbaseVectorStore. This includes the options for adding vectors. |