VertexAIGeminiChatCompletionService Constructors
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.
Overloads
VertexAIGeminiChatCompletionService(String, Func<ValueTask<String>>, String, String, VertexAIVersion, HttpClient, ILoggerFactory) |
Initializes a new instance of the VertexAIGeminiChatCompletionService class. |
VertexAIGeminiChatCompletionService(String, String, String, String, VertexAIVersion, HttpClient, ILoggerFactory) |
Initializes a new instance of the VertexAIGeminiChatCompletionService class. |
VertexAIGeminiChatCompletionService(String, Func<ValueTask<String>>, String, String, VertexAIVersion, HttpClient, ILoggerFactory)
Initializes a new instance of the VertexAIGeminiChatCompletionService class.
public VertexAIGeminiChatCompletionService (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.VertexAIGeminiChatCompletionService : 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.VertexAIGeminiChatCompletionService
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 Gemini model for the chat completion service.
- location
- String
The region to process the request
- projectId
- String
Your project ID
- apiVersion
- VertexAIVersion
Version of the Vertex API
- httpClient
- HttpClient
Optional HTTP client to be used for communication with the Gemini API.
- 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
VertexAIGeminiChatCompletionService(String, String, String, String, VertexAIVersion, HttpClient, ILoggerFactory)
Initializes a new instance of the VertexAIGeminiChatCompletionService class.
public VertexAIGeminiChatCompletionService (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.VertexAIGeminiChatCompletionService : string * string * string * string * Microsoft.SemanticKernel.Connectors.Google.VertexAIVersion * System.Net.Http.HttpClient * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.SemanticKernel.Connectors.Google.VertexAIGeminiChatCompletionService
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 Gemini model for the chat completion service.
- bearerKey
- String
The Bearer Key for authentication.
- location
- String
The region to process the request
- projectId
- String
Your project ID
- apiVersion
- VertexAIVersion
Version of the Vertex API
- httpClient
- HttpClient
Optional HTTP client to be used for communication with the Gemini API.
- loggerFactory
- ILoggerFactory
Optional logger factory to be used for logging.