Linguagem

AzureOpenAIChatCompletionService Class

Definition

Azure OpenAI chat completion service.

public sealed class AzureOpenAIChatCompletionService : Microsoft.SemanticKernel.ChatCompletion.IChatCompletionService, Microsoft.SemanticKernel.TextGeneration.ITextGenerationService
type AzureOpenAIChatCompletionService = class
    interface IChatCompletionService
    interface IAIService
    interface ITextGenerationService
Public NotInheritable Class AzureOpenAIChatCompletionService
Implements IChatCompletionService, ITextGenerationService
Inheritance
AzureOpenAIChatCompletionService
Implements

Constructors

Name Description
AzureOpenAIChatCompletionService(String, AzureOpenAIClient, String, ILoggerFactory)

Initializes a new instance of the AzureOpenAIChatCompletionService class.

AzureOpenAIChatCompletionService(String, String, String, String, HttpClient, ILoggerFactory, String)

Initializes a new instance of the AzureOpenAIChatCompletionService class.

AzureOpenAIChatCompletionService(String, String, TokenCredential, String, HttpClient, ILoggerFactory, String)

Initializes a new instance of the AzureOpenAIChatCompletionService class.

Properties

Name Description
Attributes

Gets the AI service attributes.

Methods

Name Description
GetChatMessageContentsAsync(ChatHistory, PromptExecutionSettings, Kernel, CancellationToken)

Get chat multiple chat content choices for the prompt and settings.

GetStreamingChatMessageContentsAsync(ChatHistory, PromptExecutionSettings, Kernel, CancellationToken)

Get streaming chat contents for the chat history provided using the specified settings.

GetStreamingTextContentsAsync(String, PromptExecutionSettings, Kernel, CancellationToken)

Get streaming results for the prompt using the specified execution settings. Each modality may support for different types of streaming contents.

GetTextContentsAsync(String, PromptExecutionSettings, Kernel, CancellationToken)

Get completion results for the prompt and settings.

Extension Methods

Name Description
AsChatClient(IChatCompletionService)

Creates an IChatClient for the specified IChatCompletionService.

GetApiVersion(IAIService)

Gets the API version from service's Attributes

GetChatMessageContentAsync(IChatCompletionService, ChatHistory, PromptExecutionSettings, Kernel, CancellationToken)

Get a single chat message content for the chat history and settings provided.

GetChatMessageContentAsync(IChatCompletionService, String, PromptExecutionSettings, Kernel, CancellationToken)

Get a single chat message content for the prompt and settings.

GetChatMessageContentsAsync(IChatCompletionService, String, PromptExecutionSettings, Kernel, CancellationToken)

Get chat multiple chat message content choices for the prompt and settings.

GetEndpoint(IAIService)

Gets the endpoint from service's Attributes.

GetModelId(IAIService)

Gets the model identifier from service's Attributes.

GetStreamingChatMessageContentsAsync(IChatCompletionService, String, PromptExecutionSettings, Kernel, CancellationToken)

Get streaming chat message contents for the chat history provided using the specified settings.

GetTextContentAsync(ITextGenerationService, String, PromptExecutionSettings, Kernel, CancellationToken)

Get a single text generation result for the prompt and settings.

Applies to