ChatEventBuilder

Methods

Input(System.String)

Defines the handler of the Input client-side event. 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)

Defines the handler of the Input client-side event. 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)

Defines the handler of the SendMessage client-side event. 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)

Defines the handler of the SendMessage client-side event. 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)

Defines the handler of the FileSelect client-side event. 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)

Defines the handler of the FileSelect client-side event. 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)

Defines the handler of the FileRemove client-side event. 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)

Defines the handler of the FileRemove client-side event. 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)

Defines the handler of the SuggestionClick client-side event. Fired when a user clicks a global suggestion in the Chat. This event is useful for tracking user engagement with the global 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)

Defines the handler of the SuggestionClick client-side event. Fired when a user clicks a global suggestion in the Chat. This event is useful for tracking user engagement with the global 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)

Defines the handler of the Unpin client-side event. 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)

Defines the handler of the Unpin client-side event. 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)

Defines the handler of the ToolbarAction client-side event. 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)

Defines the handler of the ToolbarAction client-side event. 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)

Defines the handler of the FileMenuAction client-side event. 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)

Defines the handler of the FileMenuAction client-side event. 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)

Defines the handler of the ContextMenuAction client-side event. 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)

Defines the handler of the ContextMenuAction client-side event. 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)

Defines the handler of the Download client-side event. 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)

Defines the handler of the Download client-side event. 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 .