ai.aiPrompt.systemPromptFunction

Defines the system prompt for the side panel AI Prompt tool. The function accepts the following arguments:

  • context - The selected text in the editor.
  • prompt - The user prompt.

Example

<textarea id="editor"></textarea>
<script>
$("#editor").kendoEditor({
  ai: {
    aiPrompt: {
      systemPrompt: (context, prompt) => `You are an advanced AI language assistant.
                            A user has selected a portion of their text and provided a query regarding how they want it modified.
                            Your task is to accurately respond to their request while preserving the original intent of the text.
                            Follow the instructions strictly and provide only the requested output unless explicitly asked to explain your changes.

                            Selected Text:
                            ${context}

                            User's Request:
                            ${prompt}

                            Response:`
    }
  }
});
</script>
In this article
ai.aiPrompt.systemPrompt
Not finding the help you need?
Contact Support