Static method to create a new CloseVectorWeb instance from texts and metadata. It creates a new Document instance for each text and metadata, then calls the fromDocuments method to create the CloseVectorWeb instance.
fromTexts(
texts: string[],
metadatas: object | object[],
embeddings: EmbeddingsInterface,
args: Record<string, unknown>,
credential: CloseVectorCredentials
): Promise<CloseVectorNode>| Name | Type | Description |
|---|---|---|
texts* | string[] | The texts to be used to create the documents. |
metadatas* | object | object[] | The metadata to be used to create the documents. |
embeddings* | EmbeddingsInterface | The embeddings to be used by the CloseVectorWeb instance. |
args | Record<string, unknown> | An optional configuration object for the CloseVectorWeb instance. |
credential | CloseVectorCredentials | An optional credential object for the CloseVector API. |