Share via


ChatResponseExtensions Class

Definition

Provides extension methods for working with ChatResponse and ChatResponseUpdate instances.

public ref class ChatResponseExtensions abstract sealed
public static class ChatResponseExtensions
type ChatResponseExtensions = class
Public Module ChatResponseExtensions
Inheritance
ChatResponseExtensions

Methods

AddMessages(IList<ChatMessage>, ChatResponse)

Adds all of the messages from response into list.

AddMessages(IList<ChatMessage>, ChatResponseUpdate, Func<AIContent,Boolean>)

Converts the update into a ChatMessage instance and adds it to list.

AddMessages(IList<ChatMessage>, IEnumerable<ChatResponseUpdate>)

Converts the updates into ChatMessage instances and adds them to list.

AddMessagesAsync(IList<ChatMessage>, IAsyncEnumerable<ChatResponseUpdate>, CancellationToken)

Converts the updates into ChatMessage instances and adds them to list.

ToChatResponse(IEnumerable<ChatResponseUpdate>)

Combines ChatResponseUpdate instances into a single ChatResponse.

ToChatResponseAsync(IAsyncEnumerable<ChatResponseUpdate>, CancellationToken)

Combines ChatResponseUpdate instances into a single ChatResponse.

Applies to