IChatMessageQueue Interface

Lets an IChatClient take messages the user sends while one of its responses is still streaming. Return the implementation from Object) and CancellationToken) forwards to it, so an agent that reads new messages between its steps can be plugged into RadzenAIChat as a chat client without implementing IAIChatService.

Namespace: Radzen

Assembly: Radzen.Blazor.dll

Syntax

public interface IChatMessageQueue

Methods

TryQueueMessageAsyncLink to this section

Offers the client a message sent while its response streams. Return true to take it; the chat then shows it as sent and does not send it again.

Declaration
public abstract Task<bool> TryQueueMessageAsync(Microsoft.Extensions.AI.ChatMessage message, string sessionId, Threading.CancellationToken cancellationToken)
Parameters
Type Name Description
Microsoft.Extensions.AI.ChatMessage message The message.
string sessionId The session whose response is streaming.
Threading.CancellationToken cancellationToken A cancellation token.
Returns
Type Description
Task<bool>
In This Article
An error has occurred. This app may no longer respond until reloaded. Reload 🗙