SAP AI SDK for JavaScript - v2.8.0
    Preparing search index...

    Interface PromptTemplatingModule

    Prompt templating module configuration.

    interface PromptTemplatingModule {
        model: LlmModelDetails;
        prompt?: string | Xor<PromptTemplate, TemplateRef>;
    }
    Index

    Properties

    Properties

    LLM model details.

    prompt?: string | Xor<PromptTemplate, TemplateRef>

    Static prompts. Can be:

    • A template: an array of templated chat messages (with {{?placeholders}}).
    • An id or scenario, name and version: reference to a remote prompt template.

    This is meant for static instructions included with every call. For per-request templating, use messages in .chatCompletion() instead.

    prompt: {
    template: [
    {
    role: 'system',
    content: 'You are an assistant for {{?product}}.'
    }
    ]
    }

    Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.