Share via


VertexAITextEmbeddingGenerationService Constructors

Definition

Overloads

VertexAITextEmbeddingGenerationService(String, Func<ValueTask<String>>, String, String, VertexAIVersion, HttpClient, ILoggerFactory)

Initializes a new instance of the VertexAITextEmbeddingGenerationService class.

VertexAITextEmbeddingGenerationService(String, String, String, String, VertexAIVersion, HttpClient, ILoggerFactory)

Initializes a new instance of the VertexAITextEmbeddingGenerationService class.

VertexAITextEmbeddingGenerationService(String, Func<ValueTask<String>>, String, String, VertexAIVersion, HttpClient, ILoggerFactory)

Initializes a new instance of the VertexAITextEmbeddingGenerationService class.

public VertexAITextEmbeddingGenerationService (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, System.Net.Http.HttpClient? httpClient = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.SemanticKernel.Connectors.Google.VertexAITextEmbeddingGenerationService : string * Func<System.Threading.Tasks.ValueTask<string>> * string * string * Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.Google.VertexAITextEmbeddingGenerationService
Public Sub New (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 httpClient As HttpClient = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)

Parameters

modelId
String

The model identifier.

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

Version of the Vertex API

httpClient
HttpClient

The optional HTTP client.

loggerFactory
ILoggerFactory

Optional logger factory to be used for logging.

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

VertexAITextEmbeddingGenerationService(String, String, String, String, VertexAIVersion, HttpClient, ILoggerFactory)

Initializes a new instance of the VertexAITextEmbeddingGenerationService class.

public VertexAITextEmbeddingGenerationService (string modelId, string bearerKey, string location, string projectId, Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion apiVersion = Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion.V1, System.Net.Http.HttpClient? httpClient = default, Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory = default);
new Microsoft.SemanticKernel.Connectors.Google.VertexAITextEmbeddingGenerationService : string * string * string * string * Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.Google.VertexAITextEmbeddingGenerationService
Public Sub New (modelId As String, bearerKey As String, location As String, projectId As String, Optional apiVersion As VertexAIVersion = Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion.V1, Optional httpClient As HttpClient = Nothing, Optional loggerFactory As ILoggerFactory = Nothing)

Parameters

modelId
String

The model identifier.

bearerKey
String

The Bearer Key for authentication.

location
String

The location to process the request.

projectId
String

Your Project Id.

apiVersion
VertexAIVersion

Version of the Vertex API

httpClient
HttpClient

The optional HTTP client.

loggerFactory
ILoggerFactory

Optional logger factory to be used for logging.

Applies to