Share via


QdrantBuilderExtensions.AddQdrant Method

Definition

Adds a Qdrant resource to the application. A container is used for local development.

public static Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.QdrantServerResource> AddQdrant (this Aspire.Hosting.IDistributedApplicationBuilder builder, string name, Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource>? apiKey = default, int? grpcPort = default, int? httpPort = default);
static member AddQdrant : Aspire.Hosting.IDistributedApplicationBuilder * string * Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.ParameterResource> * Nullable<int> * Nullable<int> -> Aspire.Hosting.ApplicationModel.IResourceBuilder<Aspire.Hosting.ApplicationModel.QdrantServerResource>
<Extension()>
Public Function AddQdrant (builder As IDistributedApplicationBuilder, name As String, Optional apiKey As IResourceBuilder(Of ParameterResource) = Nothing, Optional grpcPort As Nullable(Of Integer) = Nothing, Optional httpPort As Nullable(Of Integer) = Nothing) As IResourceBuilder(Of QdrantServerResource)

Parameters

name
String

The name of the resource. This name will be used as the connection string name when referenced in a dependency

apiKey
IResourceBuilder<ParameterResource>

The parameter used to provide the API Key for the Qdrant resource. If null a random key will be generated as {name}-Key.

grpcPort
Nullable<Int32>

The host port of gRPC endpoint of Qdrant database.

httpPort
Nullable<Int32>

The host port of HTTP endpoint of Qdrant database.

Returns

A reference to the IResourceBuilder<T>.

Remarks

This version the package defaults to the v1.8.4 tag of the qdrant/qdrant container image. The .NET client library uses the gRPC port by default to communicate and this resource exposes that endpoint.

Applies to