次の方法で共有


VertexAIKernelBuilderExtensions.AddVertexAIEmbeddingGeneration Method

Definition

Overloads

AddVertexAIEmbeddingGeneration(IKernelBuilder, String, Func<ValueTask<String>>, String, String, VertexAIVersion, String, HttpClient)

Adds Vertex AI embeddings generation service to the kernel builder.

AddVertexAIEmbeddingGeneration(IKernelBuilder, String, String, String, String, VertexAIVersion, String, HttpClient)

Adds Vertex AI embeddings generation service to the kernel builder.

AddVertexAIEmbeddingGeneration(IKernelBuilder, String, Func<ValueTask<String>>, String, String, VertexAIVersion, String, HttpClient)

Adds Vertex AI embeddings generation service to the kernel builder.

public static Microsoft.SemanticKernel.IKernelBuilder AddVertexAIEmbeddingGeneration (this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, Func<System.Threading.Tasks.ValueTask<string>> bearerTokenProvider, string location, string projectId, Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion apiVersion = Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion.V1, string? serviceId = default, System.Net.Http.HttpClient? httpClient = default);
static member AddVertexAIEmbeddingGeneration : Microsoft.SemanticKernel.IKernelBuilder * string * Func<System.Threading.Tasks.ValueTask<string>> * string * string * Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion * string * System.Net.Http.HttpClient -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddVertexAIEmbeddingGeneration (builder As IKernelBuilder, modelId As String, bearerTokenProvider As Func(Of ValueTask(Of String)), location As String, projectId As String, Optional apiVersion As VertexAIVersion = Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion.V1, Optional serviceId As String = Nothing, Optional httpClient As HttpClient = Nothing) As IKernelBuilder

Parameters

builder
IKernelBuilder

The kernel builder.

modelId
String

The model for text generation.

bearerTokenProvider
Func<ValueTask<String>>

The Bearer Key provider for authentication.

location
String

The location to process the request

projectId
String

Your project ID

apiVersion
VertexAIVersion

The version of the Vertex API.

serviceId
String

The optional service ID.

httpClient
HttpClient

The optional custom HttpClient.

Returns

The updated kernel builder.

Remarks

This bearerTokenProvider will be called on every request, when providing the token consider using caching strategy and refresh token logic when it is expired or close to expiration.

Applies to

AddVertexAIEmbeddingGeneration(IKernelBuilder, String, String, String, String, VertexAIVersion, String, HttpClient)

Adds Vertex AI embeddings generation service to the kernel builder.

public static Microsoft.SemanticKernel.IKernelBuilder AddVertexAIEmbeddingGeneration (this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, string bearerKey, string location, string projectId, Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion apiVersion = Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion.V1, string? serviceId = default, System.Net.Http.HttpClient? httpClient = default);
static member AddVertexAIEmbeddingGeneration : Microsoft.SemanticKernel.IKernelBuilder * string * string * string * string * Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion * string * System.Net.Http.HttpClient -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddVertexAIEmbeddingGeneration (builder As IKernelBuilder, modelId As String, bearerKey As String, location As String, projectId As String, Optional apiVersion As VertexAIVersion = Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion.V1, Optional serviceId As String = Nothing, Optional httpClient As HttpClient = Nothing) As IKernelBuilder

Parameters

builder
IKernelBuilder

The kernel builder.

modelId
String

The model for text generation.

bearerKey
String

The Bearer Key for authentication.

location
String

The location to process the request

projectId
String

Your project ID

apiVersion
VertexAIVersion

The version of the Vertex API.

serviceId
String

The optional service ID.

httpClient
HttpClient

The optional custom HttpClient.

Returns

The updated kernel builder.

Applies to