Freigeben über


HuggingFaceChatCompletionService.GetChatMessageContentsAsync Method

Definition

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

public System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.ChatMessageContent>> GetChatMessageContentsAsync (Microsoft.SemanticKernel.ChatCompletion.ChatHistory chatHistory, Microsoft.SemanticKernel.PromptExecutionSettings? executionSettings = default, Microsoft.SemanticKernel.Kernel? kernel = default, System.Threading.CancellationToken cancellationToken = default);
abstract member GetChatMessageContentsAsync : Microsoft.SemanticKernel.ChatCompletion.ChatHistory * Microsoft.SemanticKernel.PromptExecutionSettings * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.ChatMessageContent>>
override this.GetChatMessageContentsAsync : Microsoft.SemanticKernel.ChatCompletion.ChatHistory * Microsoft.SemanticKernel.PromptExecutionSettings * Microsoft.SemanticKernel.Kernel * System.Threading.CancellationToken -> System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyList<Microsoft.SemanticKernel.ChatMessageContent>>
Public Function GetChatMessageContentsAsync (chatHistory As ChatHistory, Optional executionSettings As PromptExecutionSettings = Nothing, Optional kernel As Kernel = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IReadOnlyList(Of ChatMessageContent))

Parameters

chatHistory
ChatHistory

The chat history context.

executionSettings
PromptExecutionSettings

The AI execution settings (optional).

kernel
Kernel

The Kernel containing services, plugins, and other state for use throughout the operation.

cancellationToken
CancellationToken

The CancellationToken to monitor for cancellation requests. The default is None.

Returns

List of different chat results generated by the remote model

Implements

Applies to