smartBox.aiAssistantResponseError
Fired when the AI service returns an error in AI Assistant mode.
Example - handle AI response error event
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
columns: [
{ field: "ProductName" },
{ field: "UnitPrice" }
],
dataSource: {
data: [
{ ProductName: "Tea", UnitPrice: 10 },
{ ProductName: "Coffee", UnitPrice: 15 }
]
},
search: {
fields: [{ name: "ProductName", operator: "contains" }]
},
toolbar: ["smartBox"],
smartBox: {
activeMode: "AIAssistant",
aiAssistantSettings: {
enabled: true,
service: "https://demos.telerik.com/service/v2/ai/grid/smart-state"
},
aiAssistantResponseError: function(e) {
console.log("AI Error:", e.error);
}
}
});
</script>