ChatEventBuilder

Methods

Input(System.String)

Fired when the user types in the message input field.

For more information see Input event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the input event.

RETURNS

Returns the current instance of ChatEventBuilder .

Input(System.Func)

Fired when the user types in the message input field.

For more information see Input event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

SendMessage(System.String)

Fired when the user clicks the action button (send or stop). This is the primary event for handling message submission and stop generation requests.The postMessage method do not trigger this event.

For more information see SendMessage event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the sendMessage event.

RETURNS

Returns the current instance of ChatEventBuilder .

SendMessage(System.Func)

Fired when the user clicks the action button (send or stop). This is the primary event for handling message submission and stop generation requests.The postMessage method do not trigger this event.

For more information see SendMessage event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

FileSelect(System.String)

Fired when the user selects files using the file attachment button.

For more information see FileSelect event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the fileSelect event.

RETURNS

Returns the current instance of ChatEventBuilder .

FileSelect(System.Func)

Fired when the user selects files using the file attachment button.

For more information see FileSelect event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

FileRemove(System.String)

Fired when the user removes a file attachment.

For more information see FileRemove event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the fileRemove event.

RETURNS

Returns the current instance of ChatEventBuilder .

FileRemove(System.Func)

Fired when the user removes a file attachment.

For more information see FileRemove event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

SuggestionClick(System.String)

Fired when a user clicks on a suggested message or action. This event is useful for tracking user engagement with suggestions and handling custom suggestion logic.

For more information see SuggestionClick event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the suggestionClick event.

RETURNS

Returns the current instance of ChatEventBuilder .

SuggestionClick(System.Func)

Fired when a user clicks on a suggested message or action. This event is useful for tracking user engagement with suggestions and handling custom suggestion logic.

For more information see SuggestionClick event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

Unpin(System.String)

Fired when a pinned message is unpinned. This event is triggered when a user clicks the close (X) button on a pinned message.

For more information see Unpin event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the unpin event.

RETURNS

Returns the current instance of ChatEventBuilder .

Unpin(System.Func)

Fired when a pinned message is unpinned. This event is triggered when a user clicks the close (X) button on a pinned message.

For more information see Unpin event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

ToolbarAction(System.String)

Fired when a toolbar action is executed on a message. This event allows you to handle custom toolbar actions and respond to user interactions with message controls.

For more information see ToolbarAction event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the toolbarAction event.

RETURNS

Returns the current instance of ChatEventBuilder .

ToolbarAction(System.Func)

Fired when a toolbar action is executed on a message. This event allows you to handle custom toolbar actions and respond to user interactions with message controls.

For more information see ToolbarAction event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

FileMenuAction(System.String)

Fired when a file context menu action is executed. This event allows you to handle custom file actions and respond to user interactions with file attachments.

For more information see FileMenuAction event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the fileMenuAction event.

RETURNS

Returns the current instance of ChatEventBuilder .

FileMenuAction(System.Func)

Fired when a file context menu action is executed. This event allows you to handle custom file actions and respond to user interactions with file attachments.

For more information see FileMenuAction event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

ContextMenuAction(System.String)

Fired when a message context menu action is executed. This event allows you to handle custom message actions and respond to user interactions with message context menus.

For more information see ContextMenuAction event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the contextMenuAction event.

RETURNS

Returns the current instance of ChatEventBuilder .

ContextMenuAction(System.Func)

Fired when a message context menu action is executed. This event allows you to handle custom message actions and respond to user interactions with message context menus.

For more information see ContextMenuAction event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .

Download(System.String)

Fired when a download action is triggered, either from the "Download All" button or from a file menu download action.

For more information see Download event.

Parameters

handler - System.String

The name of the JavaScript function that will handle the download event.

RETURNS

Returns the current instance of ChatEventBuilder .

Download(System.Func)

Fired when a download action is triggered, either from the "Download All" button or from a file menu download action.

For more information see Download event.

Parameters

handler - System.Func<Object,Object>

The handler code wrapped in a text tag.

RETURNS

Returns the current instance of ChatEventBuilder .