New to Kendo UI for jQueryStart a free 30-day trial

Ai.service

configuration

The URL or the configuration of the AI service to use for generating outputs.

ai.service

String|Object
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [{ field: "name" }],
   dataSource: [{ name: "Jane Doe" }],
   toolbar: ["aiAssistant"],
   ai: {
     service: "https://demos.telerik.com/service/v2/ai/grid/smart-state"
   }
});
</script>

ai.service.data

Object|Function

The data to send with the AI service request.

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [{ field: "name" }],
   dataSource: [{ name: "Jane Doe" }],
   toolbar: ["aiAssistant"],
   ai: {
     service: {
       url: "https://demos.telerik.com/service/v2/ai/grid/smart-state",
       data: (prompt) => ({
        "role": "user",
        "contents": [{
          "$type": "text",
          "text": prompt
        }],
        "columns": [{ field: "name" }],
      })
     }
   }
});
</script>

The headers to send with the AI service request.

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [{ field: "name" }],
   dataSource: [{ name: "Jane Doe" }],
   toolbar: ["aiAssistant"],
   ai: {
     service: {
       url: "https://demos.telerik.com/service/v2/ai/grid/smart-state",
       headers: {
         "Content-Type": "application/json"
       }
     }
   }
});
</script>

The function to get the output from the AI service response.

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [{ field: "name" }],
   dataSource: [{ name: "Jane Doe" }],
   toolbar: ["aiAssistant"],
   ai: {
     service: {
       url: "https://demos.telerik.com/service/v2/ai/grid/smart-state",
       outputGetter: function(response) {
         return response.messages.join("---");
       }
     }
   }
});
</script>

The URL of the AI service to use for generating outputs.

<div id="grid"></div>
<script>
$("#grid").kendoGrid({
   columns: [{ field: "name" }],
   dataSource: [{ name: "Jane Doe" }],
   toolbar: ["aiAssistant"],
   ai: {
     service: {
       url: "https://demos.telerik.com/service/v2/ai/grid/smart-state"
     }
   }
});
</script>