WeaviateServiceCollectionExtensions.AddWeaviateVectorStoreRecordCollection<TRecord> 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.
Register a Weaviate Microsoft.Extensions.VectorData.IVectorStoreRecordCollection`2 and Microsoft.Extensions.VectorData.IVectorizedSearch`1 with the specified service ID.
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWeaviateVectorStoreRecordCollection<TRecord>(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, string collectionName, System.Net.Http.HttpClient? httpClient = default, Microsoft.SemanticKernel.Connectors.Weaviate.WeaviateVectorStoreRecordCollectionOptions<TRecord>? options = default, string? serviceId = default);
static member AddWeaviateVectorStoreRecordCollection : Microsoft.Extensions.DependencyInjection.IServiceCollection * string * System.Net.Http.HttpClient * Microsoft.SemanticKernel.Connectors.Weaviate.WeaviateVectorStoreRecordCollectionOptions<'Record> * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddWeaviateVectorStoreRecordCollection(Of TRecord) (services As IServiceCollection, collectionName As String, Optional httpClient As HttpClient = Nothing, Optional options As WeaviateVectorStoreRecordCollectionOptions(Of TRecord) = Nothing, Optional serviceId As String = Nothing) As IServiceCollection
Type Parameters
- 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.
- httpClient
- HttpClient
HttpClient that is used to interact with Weaviate API. BaseAddress should point to remote or local cluster and API key can be configured via DefaultRequestHeaders. It's also possible to provide these parameters via WeaviateVectorStoreOptions.
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.