GoogleAIKernelBuilderExtensions.AddGoogleAIGeminiChatCompletion Method
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.
Add Google AI Gemini Chat Completion and Text Generation services to the kernel builder.
public static Microsoft.SemanticKernel.IKernelBuilder AddGoogleAIGeminiChatCompletion (this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, string apiKey, Microsoft.SemanticKernel.Connectors.Google.GoogleAIVersion apiVersion = Microsoft.SemanticKernel.Connectors.Google.GoogleAIVersion.V1_Beta, string? serviceId = default, System.Net.Http.HttpClient? httpClient = default);
static member AddGoogleAIGeminiChatCompletion : Microsoft.SemanticKernel.IKernelBuilder * string * string * Microsoft.SemanticKernel.Connectors.Google.GoogleAIVersion * string * System.Net.Http.HttpClient -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddGoogleAIGeminiChatCompletion (builder As IKernelBuilder, modelId As String, apiKey As String, Optional apiVersion As GoogleAIVersion = Microsoft.SemanticKernel.Connectors.Google.GoogleAIVersion.V1_Beta, 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.
- apiKey
- String
The API key for authentication Gemini API.
- apiVersion
- GoogleAIVersion
The version of the Google API.
- serviceId
- String
The optional service ID.
- httpClient
- HttpClient
The optional custom HttpClient.
Returns
The updated kernel builder.