ai.service.dataObject|Function

The data to send with the AI service request.

Example - configure AI service data

<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>
In this article
ai.service.data
Not finding the help you need?
Contact Support