Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

Chat

Since 0.1.0-alpha.22
Builds an AI assistant's chat panel or a conversation between people.

IzzyBlazor.Chat in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly and its doc comments.

Properties (17)

Labelstring requiredAdded in 0.1.0-alpha.22

Names the conversation's log, such as "Assistant" or "Messages with Dana". Required.

ChildContentRenderFragment?Added in 0.1.0-alpha.22

The entries: ChatEntry items, oldest first.

EmptyContentRenderFragment?Added in 0.1.0-alpha.22

Shown in the log before the first entry, such as a greeting.

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.

SuggestionsIReadOnlyList<string>?Added in 0.1.0-alpha.22

Messages a person can send with one press, shown above the box while nothing is on its way.

Placeholderstring?Added in 0.1.0-alpha.22

The prompt in the empty box, such as "Ask about your order".

MaxLengthint?Added in 0.1.0-alpha.22

The most characters a message can have.

FormNamestring = "chat"Added in 0.1.0-alpha.22

The form's name on a static page, unique on the page, as a Form's FormName. Defaults to "chat".

FormActionstring?Added in 0.1.0-alpha.22

The address the form posts to on a static page; by default, the page's own. Set it to keep the conversation's id in the address, such as /help?conversation=4f2a: the post goes there, so the page knows the conversation, with no redirect.

@bind-Draftstring?Added in 0.1.0-alpha.22 @bind: Interactive only

The message being written, to fill the box or clear it from code (with @bind-Draft, it follows what's typed on an interactive page). A static page shows it in the box.

ComposerActionsRenderFragment?Added in 0.1.0-alpha.22

Buttons of your own in the box's row of tools, just before Send, such as a microphone that dictates into Draft. Give each a label.

AllowFilesbool = falseAdded in 0.1.0-alpha.22

Adds a button to attach files to a message: they come to OnSend as its Files.

Acceptstring?Added in 0.1.0-alpha.22

The file types that can be attached, as a file input's accept: .pdf,image/*.

MaxFileSizelong = 10000000Added in 0.1.0-alpha.22

The largest file that can be attached, in bytes. Defaults to 10 MB (10,000,000).

MaxFilesint = 5Added in 0.1.0-alpha.22

The most files a message can have. Defaults to 5.

VariantChatVariant = ChatVariant.AssistantAdded in 0.1.0-alpha.22

How others' entries look: across the log (Assistant, the default) or in bubbles (Conversation, for people talking).

HeadingLevelint = 3Added in 0.1.0-alpha.22

The level of each entry's hidden heading, 2 to 6. Defaults to 3.

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, documented here with it.

ChatEntry

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

Minebool = falseAdded in 0.1.0-alpha.22

Whether the entry is yours: it sits at the end, in a bubble, with no name.

Authorstring?Added in 0.1.0-alpha.22

Who wrote it, such as "Assistant" or "Dana". Shown above it, and its avatar's name.

Avatarstring?Added in 0.1.0-alpha.22

The address of the author's picture. Without one, others' avatars show the author's initials; yours shows only with this or Initials.

Initialsstring?Added in 0.1.0-alpha.22

The avatar's letters, such as "IB", in place of the author's initials (and without a picture).

TimeDateTimeOffset?Added in 0.1.0-alpha.22

When it was written: the time is shown, and the day above the day's first entry. Both are in the value's own offset, so give it in the reader's (the server can't know their time zone).

Textstring?Added in 0.1.0-alpha.22

The message as plain text; its line breaks are kept.

Markdownstring?Added in 0.1.0-alpha.22

The message as Markdown, shown as Markdown shows it.

Htmlstring?Added in 0.1.0-alpha.22

The message as HTML; it's sanitized first.

ChildContentRenderFragment?Added in 0.1.0-alpha.22

Anything else, such as a card or the sources an answer used. It replaces Text, Markdown and Html.

AttachmentsIReadOnlyList<ChatAttachment>?Added in 0.1.0-alpha.22

Files sent with it, shown under it as their names (linked when they have an address).

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.

ActionsRenderFragment?Added in 0.1.0-alpha.22

Buttons of your own after Copy, such as thumbs up and down for an answer. Give each a label.

Copyablebool? (computed)Added in 0.1.0-alpha.22

Whether a copy button copies its text. Defaults to on for others' entries and off for yours.

OnRetryEventCallbackAdded in 0.1.0-alpha.22

Called when a person chooses Retry on a failed entry.

Types (4)

ChatAttachment

record

A file shown on a ChatEntry: its name, and where to get it.

ChatAttachment members
MemberDescription
Name string

The file's name, such as "invoice.pdf".

Href string?

The address it can be opened or downloaded at; without one, it's only named.

Size long?

Its size in bytes, shown beside the name.

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.

ChatVariant

enum

How a Chat shows others' entries.

ChatVariant values
ValueDescription
Assistant

Others' entries across the log with no bubble, for an assistant's answers with tables and code. Yours are bubbles at the end.

Conversation

Everyone's entries in bubbles, yours at the end and others' at the start, for people talking.

Connection lost

Rejoining the server…