AzureAIInferenceKernelBuilderExtensions.AddAzureAIInferenceChatCompletion 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.
Overloads
AddAzureAIInferenceChatCompletion(IKernelBuilder, String, ChatCompletionsClient, String)
Adds the AzureAIInferenceChatCompletionService to the Services.
public static Microsoft.SemanticKernel.IKernelBuilder AddAzureAIInferenceChatCompletion (this Microsoft.SemanticKernel.IKernelBuilder builder, string modelId, Azure.AI.Inference.ChatCompletionsClient? chatClient = default, string? serviceId = default);
static member AddAzureAIInferenceChatCompletion : Microsoft.SemanticKernel.IKernelBuilder * string * Azure.AI.Inference.ChatCompletionsClient * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddAzureAIInferenceChatCompletion (builder As IKernelBuilder, modelId As String, Optional chatClient As ChatCompletionsClient = Nothing, Optional serviceId As String = Nothing) As IKernelBuilder
Parameters
- builder
- IKernelBuilder
The IKernelBuilder instance to augment.
- modelId
- String
Azure AI Inference model id
- chatClient
- ChatCompletionsClient
ChatCompletionsClient to use for the service. If null, one must be available in the service provider when this service is resolved.
- serviceId
- String
A local identifier for the given AI service
Returns
The same instance as builder
.
Applies to
AddAzureAIInferenceChatCompletion(IKernelBuilder, String, TokenCredential, Uri, HttpClient, String)
Adds the AzureAIInferenceChatCompletionService to the Services.
public static Microsoft.SemanticKernel.IKernelBuilder AddAzureAIInferenceChatCompletion (this Microsoft.SemanticKernel.IKernelBuilder builder, string? modelId, Azure.Core.TokenCredential credential, Uri? endpoint = default, System.Net.Http.HttpClient? httpClient = default, string? serviceId = default);
static member AddAzureAIInferenceChatCompletion : Microsoft.SemanticKernel.IKernelBuilder * string * Azure.Core.TokenCredential * Uri * System.Net.Http.HttpClient * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddAzureAIInferenceChatCompletion (builder As IKernelBuilder, modelId As String, credential As TokenCredential, Optional endpoint As Uri = Nothing, Optional httpClient As HttpClient = Nothing, Optional serviceId As String = Nothing) As IKernelBuilder
Parameters
- builder
- IKernelBuilder
The IKernelBuilder instance to augment.
- modelId
- String
Target Model Id for endpoints supporting more than one model
- credential
- TokenCredential
Token credential, e.g. DefaultAzureCredential, ManagedIdentityCredential, EnvironmentCredential, etc.
- endpoint
- Uri
Endpoint / Target URI
- httpClient
- HttpClient
Custom HttpClient for HTTP requests.
- serviceId
- String
A local identifier for the given AI service
Returns
The same instance as builder
.
Applies to
AddAzureAIInferenceChatCompletion(IKernelBuilder, String, String, Uri, HttpClient, String)
Adds the AzureAIInferenceChatCompletionService to the Services.
public static Microsoft.SemanticKernel.IKernelBuilder AddAzureAIInferenceChatCompletion (this Microsoft.SemanticKernel.IKernelBuilder builder, string? modelId = default, string? apiKey = default, Uri? endpoint = default, System.Net.Http.HttpClient? httpClient = default, string? serviceId = default);
static member AddAzureAIInferenceChatCompletion : Microsoft.SemanticKernel.IKernelBuilder * string * string * Uri * System.Net.Http.HttpClient * string -> Microsoft.SemanticKernel.IKernelBuilder
<Extension()>
Public Function AddAzureAIInferenceChatCompletion (builder As IKernelBuilder, Optional modelId As String = Nothing, Optional apiKey As String = Nothing, Optional endpoint As Uri = Nothing, Optional httpClient As HttpClient = Nothing, Optional serviceId As String = Nothing) As IKernelBuilder
Parameters
- builder
- IKernelBuilder
The IKernelBuilder instance to augment.
- modelId
- String
Target Model Id for endpoints supporting more than one model
- apiKey
- String
API Key
- endpoint
- Uri
Endpoint / Target URI
- httpClient
- HttpClient
Custom HttpClient for HTTP requests.
- serviceId
- String
A local identifier for the given AI service
Returns
The same instance as builder
.