AzureCosmosDBMongoDBServiceCollectionExtensions.AddAzureCosmosDBMongoDBVectorStore Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddAzureCosmosDBMongoDBVectorStore(IServiceCollection, AzureCosmosDBMongoDBVectorStoreOptions, String) |
Register a Azure CosmosDB MongoDB IVectorStore with the specified service ID and where the Azure CosmosDB MongoDB MongoDB.Driver.IMongoDatabase is retrieved from the dependency injection container. |
AddAzureCosmosDBMongoDBVectorStore(IServiceCollection, String, String, AzureCosmosDBMongoDBVectorStoreOptions, String) |
Register a Azure CosmosDB MongoDB IVectorStore with the specified service ID
and where the Azure CosmosDB MongoDB MongoDB.Driver.IMongoDatabase is constructed using the provided |
AddAzureCosmosDBMongoDBVectorStore(IServiceCollection, AzureCosmosDBMongoDBVectorStoreOptions, String)
Register a Azure CosmosDB MongoDB IVectorStore with the specified service ID and where the Azure CosmosDB MongoDB MongoDB.Driver.IMongoDatabase is retrieved from the dependency injection container.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAzureCosmosDBMongoDBVectorStore (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.SemanticKernel.Connectors.AzureCosmosDBMongoDB.AzureCosmosDBMongoDBVectorStoreOptions? options = default, string? serviceId = default);
static member AddAzureCosmosDBMongoDBVectorStore : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.SemanticKernel.Connectors.AzureCosmosDBMongoDB.AzureCosmosDBMongoDBVectorStoreOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAzureCosmosDBMongoDBVectorStore (services As IServiceCollection, Optional options As AzureCosmosDBMongoDBVectorStoreOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to register the IVectorStore on.
Optional options to further configure the IVectorStore.
- serviceId
- String
An optional service id to use as the service key.
Returns
Service collection.
Applies to
AddAzureCosmosDBMongoDBVectorStore(IServiceCollection, String, String, AzureCosmosDBMongoDBVectorStoreOptions, String)
Register a Azure CosmosDB MongoDB IVectorStore with the specified service ID
and where the Azure CosmosDB MongoDB MongoDB.Driver.IMongoDatabase is constructed using the provided connectionString
and databaseName
.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddAzureCosmosDBMongoDBVectorStore (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string connectionString, string databaseName, Microsoft.SemanticKernel.Connectors.AzureCosmosDBMongoDB.AzureCosmosDBMongoDBVectorStoreOptions? options = default, string? serviceId = default);
static member AddAzureCosmosDBMongoDBVectorStore : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * Microsoft.SemanticKernel.Connectors.AzureCosmosDBMongoDB.AzureCosmosDBMongoDBVectorStoreOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddAzureCosmosDBMongoDBVectorStore (services As IServiceCollection, connectionString As String, databaseName As String, Optional options As AzureCosmosDBMongoDBVectorStoreOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to register the IVectorStore on.
- connectionString
- String
Connection string required to connect to Azure CosmosDB MongoDB.
- databaseName
- String
Database name for Azure CosmosDB MongoDB.
Optional options to further configure the IVectorStore.
- serviceId
- String
An optional service id to use as the service key.
Returns
Service collection.