Partager via


OpenAIChatHistoryExtensions.AddStreamingMessageAsync Method

Definition

Add a message to the chat history at the end of the streamed message

public static System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent> AddStreamingMessageAsync (this Microsoft.SemanticKernel.ChatCompletion.ChatHistory chatHistory, System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIStreamingChatMessageContent> streamingMessageContents);
static member AddStreamingMessageAsync : Microsoft.SemanticKernel.ChatCompletion.ChatHistory * System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.Connectors.OpenAI.OpenAIStreamingChatMessageContent> -> System.Collections.Generic.IAsyncEnumerable<Microsoft.SemanticKernel.StreamingChatMessageContent>
<Extension()>
Public Function AddStreamingMessageAsync (chatHistory As ChatHistory, streamingMessageContents As IAsyncEnumerable(Of OpenAIStreamingChatMessageContent)) As IAsyncEnumerable(Of StreamingChatMessageContent)

Parameters

chatHistory
ChatHistory

Target chat history

streamingMessageContents
IAsyncEnumerable<OpenAIStreamingChatMessageContent>

IAsyncEnumerator<T> list of streaming message contents

Returns

Returns the original streaming results with some message processing

Applies to