addPromptOutput

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

Parameters

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.

Example

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