service.data Object|Function

The data to send with the AI service request.

Example

Open In Dojo
<div id="aiprompt"></div>
<script>
$("#aiprompt").kendoAIPrompt({
    service: {
        url: "/api/llm",
        data: {
            "key": "value"
        }
    }
});

Example

Open In Dojo
<div id="aiprompt"></div>
<script>
$("#aiprompt").kendoAIPrompt({
    service: {
        url: "/api/llm",
        data: function(prompt, isRetry, history) {
            return {
                "messages": [{
                    type: messageTypes.user,
                    text: prompt
                }],
                "key": "value"
            }
        }
    }
});
In this article