class AzureCosmosDBNoSQLVectorStoreAzure Cosmos DB for NoSQL vCore vector store. To use this, you should have both:
@azure/cosmos NPM package installedYou do not need to create a database or container, it will be created automatically.
Embeddings interface for generating vector embeddings from text queries, enabling vector-based similarity searches.
Initializes the AzureCosmosDBNoSQLVectorStore. Connect the client to the database and create the container, creating them if needed.
Returns a string representing the type of vector store, which subclasses must implement to identify their specific vector storage type.
Method for adding documents to the AzureCosmosDBNoSQLVectorStore. It first converts the documents to texts and then adds them as vectors.
Method for adding vectors to the AzureCosmosDBNoSQLVectorStore.
Creates a VectorStoreRetriever instance with flexible configuration options.
Removes specified documents from the AzureCosmosDBNoSQLVectorStore. If no IDs or filter are specified, all documents will be removed.
Return documents selected using the maximal marginal relevance. Maximal marginal relevance optimizes for similarity to the query AND diversity among selected documents.
Performs a similarity search on the vectors stored in the container.
Performs a similarity search on the vectors stored in the container.
Searches for documents similar to a text query by embedding the query, and returns results with similarity scores.
Static method to create an instance of AzureCosmosDBNoSQLVectorStore from a list of documents. It first converts the documents to vectors and then adds them to the collection.
Static method to create an instance of AzureCosmosDBNoSQLVectorStore from a list of texts. It first converts the texts to vectors and then adds them to the collection.
The name of the serializable. Override to provide an alias or to preserve the serialized module name in minified environments.
Implemented as a static method to support loading logic.