systemPromptFunction

Sets the systemPrompt's format which will be send to the specified AI Service. Exposes both a context and prompt metadata.

Parameters

context String

The context that complements the user's request. E.g: "Make the text funnier".

prompt String

The User's prompt.

Example

<div id="inlineaiprompt"></div>
<script>
$("#inlineaiprompt").kendoInlineAIPrompt({
    service: {
        url: "api/llm"
    },
    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
systemPrompt
Not finding the help you need?
Contact Support