Static method to create an instance of MongoDBAtlasVectorSearch from a list of texts. It first converts the texts to vectors and then adds them to the MongoDB collection.
Supports two calling conventions for backward compatibility:
fromTexts(texts, metadatas, embeddings, dbConfig) embeddings are provided by the userfromTexts(texts, metadatas, dbConfig) the server handles embeddingsfromTexts(
texts: string[],
metadatas: object | object[],
embeddings: EmbeddingsInterface,
dbConfig: MongoDBAtlasVectorSearchLibArgs __type
): Promise<MongoDBAtlasVectorSearch>| Name | Type | Description |
|---|---|---|
texts* | string[] | List of texts to be converted to vectors. |
metadatas* | object | object[] | Metadata for the texts. |
embeddings* | EmbeddingsInterface | Embeddings to be used for conversion. |
dbConfig* | MongoDBAtlasVectorSearchLibArgs & __type | Database configuration for MongoDB Atlas. |