AIPromptEventBuilder
Methods
CommandExecute(System.String)
Triggered when a command item from the Commands view is clicked. The panel bar dataItem of the selected item is available through the event argument.
For more information see CommandExecute event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the commandExecute event.
CommandExecute(System.Func)
Triggered when a command item from the Commands view is clicked. The panel bar dataItem of the selected item is available through the event argument.
For more information see CommandExecute event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
PromptRequest(System.String)
Triggered when the prompt view Generate output button is clicked. The prompt text is available through the event argument. Suitable to make a request to the AI service to receive an output. Use the addPromptOutput method to add the generated output to the promptOutputs collection.The prompt, outputand isRetry properties are available in the event argument. When the output is generated after clicking the retry button of an output, the isRetry property is true and the output property is the output content of the output card.
For more information see PromptRequest event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the promptRequest event.
PromptRequest(System.Func)
Triggered when the prompt view Generate output button is clicked. The prompt text is available through the event argument. Suitable to make a request to the AI service to receive an output. Use the addPromptOutput method to add the generated output to the promptOutputs collection.The prompt, outputand isRetry properties are available in the event argument. When the output is generated after clicking the retry button of an output, the isRetry property is true and the output property is the output content of the output card.
For more information see PromptRequest event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
OutputRatingChange(System.String)
Triggered when the rating of an output is changed through the rate buttons of an output. The output id and the new rating are available through the event argument.
For more information see OutputRatingChange event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the outputRatingChange event.
OutputRatingChange(System.Func)
Triggered when the rating of an output is changed through the rate buttons of an output. The output id and the new rating are available through the event argument.
For more information see OutputRatingChange event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.
OutputCopy(System.String)
Triggered when the copy output button of an output is clicked. The prompt and the output object are available through the event argument.
For more information see OutputCopy event.
Parameters
handler - System.String
The name of the JavaScript function that will handle the outputCopy event.
OutputCopy(System.Func)
Triggered when the copy output button of an output is clicked. The prompt and the output object are available through the event argument.
For more information see OutputCopy event.
Parameters
handler - System.Func<Object,Object>
The handler code wrapped in a text tag.