Adds a prompt output to the promptOutputs collection. If the active views is OutputView, calls the view's addPromptOutput method.


promptOutput Object

The prompt output to add. The output should have the following properties:

  • output - The output content generated from the prompt.
  • prompt - The prompt text used to generate this output.
  • id - Optional - The id of the prompt output. If none is provided, the id will be generated as a kendo.guid(). The ID is rendered as data-id attribute in the prompt output.


<div id="aiprompt"></div>
var aiprompt = $("#aiprompt").kendoAIPrompt({ activeView: 1 }).data("kendoAIPrompt");
aiprompt.addPromptOutput({ prompt: "create object 1", output: "Description 1" });
In this article