Share via


AzureAIInferenceExtensions.AsIChatClient Method

Definition

Gets an IChatClient for use with this ChatCompletionsClient.

public static Microsoft.Extensions.AI.IChatClient AsIChatClient(this Azure.AI.Inference.ChatCompletionsClient chatCompletionsClient, string? modelId = default);
static member AsIChatClient : Azure.AI.Inference.ChatCompletionsClient * string -> Microsoft.Extensions.AI.IChatClient
<Extension()>
Public Function AsIChatClient (chatCompletionsClient As ChatCompletionsClient, Optional modelId As String = Nothing) As IChatClient

Parameters

chatCompletionsClient
ChatCompletionsClient

The client.

modelId
String

The ID of the model to use. If null, it can be provided per request via ModelId.

Returns

An IChatClient that can be used to converse via the ChatCompletionsClient.

Applies to