PostgresServiceCollectionExtensions.AddPostgresVectorStore 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
| AddPostgresVectorStore(IServiceCollection, PostgresVectorStoreOptions, String) |
Register a Postgres Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the NpgsqlDataSource is retrieved from the dependency injection container. |
| AddPostgresVectorStore(IServiceCollection, String, PostgresVectorStoreOptions, String) |
Register a Postgres Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where an NpgsqlDataSource is constructed using the provided parameters. |
AddPostgresVectorStore(IServiceCollection, PostgresVectorStoreOptions, String)
Register a Postgres Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where the NpgsqlDataSource is retrieved from the dependency injection container.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddPostgresVectorStore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Microsoft.SemanticKernel.Connectors.Postgres.PostgresVectorStoreOptions? options = default, string? serviceId = default);
static member AddPostgresVectorStore : Microsoft.Extensions.DependencyInjection.IServiceCollection * Microsoft.SemanticKernel.Connectors.Postgres.PostgresVectorStoreOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddPostgresVectorStore (services As IServiceCollection, Optional options As PostgresVectorStoreOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to register the Microsoft.Extensions.VectorData.IVectorStore on.
- options
- PostgresVectorStoreOptions
Optional options to further configure the Microsoft.Extensions.VectorData.IVectorStore.
- serviceId
- String
An optional service id to use as the service key.
Returns
The service collection.
Applies to
AddPostgresVectorStore(IServiceCollection, String, PostgresVectorStoreOptions, String)
Register a Postgres Microsoft.Extensions.VectorData.IVectorStore with the specified service ID and where an NpgsqlDataSource is constructed using the provided parameters.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddPostgresVectorStore(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string connectionString, Microsoft.SemanticKernel.Connectors.Postgres.PostgresVectorStoreOptions? options = default, string? serviceId = default);
static member AddPostgresVectorStore : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Microsoft.SemanticKernel.Connectors.Postgres.PostgresVectorStoreOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddPostgresVectorStore (services As IServiceCollection, connectionString As String, Optional options As PostgresVectorStoreOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Parameters
- services
- IServiceCollection
The IServiceCollection to register the Microsoft.Extensions.VectorData.IVectorStore on.
- connectionString
- String
Postgres database connection string.
- options
- PostgresVectorStoreOptions
Optional options to further configure the Microsoft.Extensions.VectorData.IVectorStore.
- serviceId
- String
An optional service id to use as the service key.
Returns
The service collection.