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

    Type Alias Template

    Representation of the 'Template' schema.

    {
    * "template": [
    * {
    * "role": "user",
    * "content": "How can the features of AI in SAP BTP specifically {{'{{?groundingOutput}}'}}, be applied to {{'{{?inputContext}}'}}"
    * }
    * ],
    * "defaults": {
    * "inputContext": "The default text that will be used in the template if inputContext is not set"
    * }
    * }
    type Template = {
        defaults?: Record<string, string>;
        response_format?:
            | ResponseFormatText
            | ResponseFormatJsonObject
            | ResponseFormatJsonSchema;
        template: TemplatingChatMessage;
        tools?: ChatCompletionTool[];
    }
    Index

    Properties

    defaults?: Record<string, string>

    Optional default values for the template. If a parameter has no default it is required.

    response_format?:
        | ResponseFormatText
        | ResponseFormatJsonObject
        | ResponseFormatJsonSchema

    Response format that the model output should adhere to. This is the same as the OpenAI definition.

    A chat message array to be formatted with values from placeholder_values. Both role and content can be templated. If messages_history is provided, the templated messages will be appended.

    A list of tools the model may call. Used to provide a list of functions the model may generate JSON inputs for. This is the same as the OpenAI definition.

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