Freigeben über


WeaviateServiceCollectionExtensions.AddWeaviateVectorStore Method

Definition

Register a Weaviate IVectorStore with the specified service ID.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddWeaviateVectorStore (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, System.Net.Http.HttpClient? httpClient = default, Microsoft.SemanticKernel.Connectors.Weaviate.WeaviateVectorStoreOptions? options = default, string? serviceId = default);
static member AddWeaviateVectorStore : Microsoft.Extensions.DependencyInjection.IServiceCollection * System.Net.Http.HttpClient * Microsoft.SemanticKernel.Connectors.Weaviate.WeaviateVectorStoreOptions * string -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddWeaviateVectorStore (services As IServiceCollection, Optional httpClient As HttpClient = Nothing, Optional options As WeaviateVectorStoreOptions = Nothing, Optional serviceId As String = Nothing) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to register the IVectorStore on.

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.

options
WeaviateVectorStoreOptions

Optional options to further configure the IVectorStore.

serviceId
String

An optional service id to use as the service key.

Returns

Service collection.

Applies to