Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Streaming from a model

Since 0.1.0-alpha.22
Stream a model's reply into the last entry, with Stop and Retry.

The members for streaming from a model, and the types they use. Every member of IzzyBlazor.Chat is on the Chat API.

Properties (1)

StatusChatStatus = ChatStatus.ReadyAdded in 0.1.0-alpha.22

Where the reply is. While it's Waiting or Streaming, Send becomes Stop and a message can't be sent.

Events (2)

OnSendEventCallback<ChatSendArgs>Added in 0.1.0-alpha.22

Called with what a person sent: the message typed, or a suggestion chosen.

OnStopEventCallbackAdded in 0.1.0-alpha.22

Called when a person chooses Stop, shown while Status is Waiting or Streaming.

Parts (1)

Components written inside Chat, and the columns' members, which PropertyColumn, TemplateColumn and DynamicColumn share.

ChatEntry

One message in a Chat: yours (Mine), or someone else's, with their name and avatar.

Pendingbool = falseAdded in 0.1.0-alpha.22

Whether more is coming: dots until content arrives, then a caret after it.

Failedbool = falseAdded in 0.1.0-alpha.22

Whether it failed: "Not sent" for yours, "Reply failed" for others, with Retry when OnRetry is set.

OnRetryEventCallbackAdded in 0.1.0-alpha.22

Called when a person chooses Retry on a failed entry.

Types (2)

ChatSendArgs

record

What a person sent in a Chat.

ChatSendArgs members
MemberDescription
Text string

The message, as typed (or the suggestion chosen), trimmed.

CanStream bool

Whether the reply can arrive in pieces: on an interactive page, and on a static page whose post came with script (with [StreamRendering] on the page). With JavaScript off it's false: send the reply whole, since a streamed one would stop at its first piece there.

Files IReadOnlyList<IBrowserFile>

The files attached (with the chat's AllowFiles), already checked against its limits. Read each with OpenReadStream.

ChatStatus

enum

Where a Chat's reply is.

ChatStatus values
ValueDescription
Ready

Nothing is on its way: Send sends.

Waiting

A message was sent and no reply has started: Stop shows in Send's place.

Streaming

A reply is arriving: Stop shows in Send's place.

Failed

The last reply failed. Send sends again.

Connection lost

Rejoining the server…