outputTemplateString | Function

A template function for customizing the display of output content. This function is called when an output has finished streaming and final content needs to be rendered.

The function receives an object with output (the output data) and content (the output text) properties and should return HTML string.

Example

<div id="aiprompt"></div>
<script>
$("#aiprompt").kendoAIPrompt({
    outputTemplate: function({ output, content }) {
        return `<div class="custom-output">
            <h4>AI Response:</h4>
            <p>${content}</p>
            <small>Generated at: ${new Date().toLocaleString()}</small>
        </div>`;
    }
});
</script>
In this article
outputTemplate
Not finding the help you need?
Contact Support