PostgresServiceCollectionExtensions.AddPostgresVectorStoreRecordCollection 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
| AddPostgresVectorStoreRecordCollection<TKey,TRecord>(IServiceCollection, String, PostgresVectorStoreRecordCollectionOptions<TRecord>, String) |
Register a Postgres Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the NpgsqlDataSource is retrieved from the dependency injection container. |
| AddPostgresVectorStoreRecordCollection<TKey,TRecord>(IServiceCollection, String, String, PostgresVectorStoreRecordCollectionOptions<TRecord>, String) |
Register a Postgres Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the NpgsqlDataSource is constructed using the provided parameters. |
AddPostgresVectorStoreRecordCollection<TKey,TRecord>(IServiceCollection, String, PostgresVectorStoreRecordCollectionOptions<TRecord>, String)
Register a Postgres Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the NpgsqlDataSource is retrieved from the dependency injection container.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddPostgresVectorStoreRecordCollection<TKey,TRecord>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string collectionName, Microsoft.SemanticKernel.Connectors.Postgres.PostgresVectorStoreRecordCollectionOptions<TRecord>? options = default, string? serviceId = default);
static member AddPostgresVectorStoreRecordCollection : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * Microsoft.SemanticKernel.Connectors.Postgres.PostgresVectorStoreRecordCollectionOptions<'Record> * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddPostgresVectorStoreRecordCollection(Of TKey, TRecord) (services As IServiceCollection, collectionName As String, Optional options As PostgresVectorStoreRecordCollectionOptions(Of TRecord) = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Type Parameters
- TKey
The type of the key.
- TRecord
The type of the record.
Parameters
- services
- IServiceCollection
The IServiceCollection to register the Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 on.
- collectionName
- String
The name of the collection.
Optional options to further configure the Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2.
- serviceId
- String
An optional service id to use as the service key.
Returns
Service collection.
Applies to
AddPostgresVectorStoreRecordCollection<TKey,TRecord>(IServiceCollection, String, String, PostgresVectorStoreRecordCollectionOptions<TRecord>, String)
Register a Postgres Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID and where the NpgsqlDataSource is constructed using the provided parameters.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddPostgresVectorStoreRecordCollection<TKey,TRecord>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string collectionName, string connectionString, Microsoft.SemanticKernel.Connectors.Postgres.PostgresVectorStoreRecordCollectionOptions<TRecord>? options = default, string? serviceId = default);
static member AddPostgresVectorStoreRecordCollection : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * string * Microsoft.SemanticKernel.Connectors.Postgres.PostgresVectorStoreRecordCollectionOptions<'Record> * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddPostgresVectorStoreRecordCollection(Of TKey, TRecord) (services As IServiceCollection, collectionName As String, connectionString As String, Optional options As PostgresVectorStoreRecordCollectionOptions(Of TRecord) = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Type Parameters
- TKey
The type of the key.
- TRecord
The type of the record.
Parameters
- services
- IServiceCollection
The IServiceCollection to register the Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 on.
- collectionName
- String
The name of the collection.
- connectionString
- String
Postgres database connection string.
Optional options to further configure the Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2.
- serviceId
- String
An optional service id to use as the service key.
Returns
Service collection.