RedisServiceCollectionExtensions.AddRedisVectorStore 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
AddRedisVectorStore(IServiceCollection, RedisVectorStoreOptions, String) |
Register a Redis IVectorStore with the specified service ID and where the Redis StackExchange.Redis.IDatabase is retrieved from the dependency injection container. |
AddRedisVectorStore(IServiceCollection, String, RedisVectorStoreOptions, String) |
Register a Redis IVectorStore with the specified service ID and where the Redis StackExchange.Redis.IDatabase is constructed using the provided |
AddRedisVectorStore(IServiceCollection, RedisVectorStoreOptions, String)
Register a Redis IVectorStore with the specified service ID and where the Redis StackExchange.Redis.IDatabase is retrieved from the dependency injection container.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRedisVectorStore (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.SemanticKernel.Connectors.Redis.RedisVectorStoreOptions? options = default, string? serviceId = default);
static member AddRedisVectorStore : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.SemanticKernel.Connectors.Redis.RedisVectorStoreOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRedisVectorStore (services As IServiceCollection, Optional options As RedisVectorStoreOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to register the IVectorStore on.
- options
- RedisVectorStoreOptions
Optional options to further configure the IVectorStore.
- serviceId
- String
An optional service id to use as the service key.
Returns
The service collection.
Applies to
AddRedisVectorStore(IServiceCollection, String, RedisVectorStoreOptions, String)
Register a Redis IVectorStore with the specified service ID and where the Redis StackExchange.Redis.IDatabase is constructed using the provided redisConnectionConfiguration
.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddRedisVectorStore (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string redisConnectionConfiguration, Microsoft.SemanticKernel.Connectors.Redis.RedisVectorStoreOptions? options = default, string? serviceId = default);
static member AddRedisVectorStore : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Microsoft.SemanticKernel.Connectors.Redis.RedisVectorStoreOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddRedisVectorStore (services As IServiceCollection, redisConnectionConfiguration As String, Optional options As RedisVectorStoreOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to register the IVectorStore on.
- redisConnectionConfiguration
- String
The Redis connection configuration string. If not provided, an StackExchange.Redis.IDatabase instance will be requested from the dependency injection container.
- options
- RedisVectorStoreOptions
Optional options to further configure the IVectorStore.
- serviceId
- String
An optional service id to use as the service key.
Returns
The service collection.