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
public interface IChatMessageQueueOffers 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.
public abstract Task<bool> TryQueueMessageAsync(Microsoft.Extensions.AI.ChatMessage message, string sessionId, Threading.CancellationToken cancellationToken)
| Type | Name | Description |
|---|---|---|
| Microsoft.Extensions.AI.ChatMessage | message | The message. |
| string | sessionId | The session whose response is streaming. |
| Threading.CancellationToken | cancellationToken | A cancellation token. |
| Type | Description |
|---|---|
| Task<bool> |