# Type Alias Template

Representation of the 'Template' schema.

#### Example

    {
     *   "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?: SchemasChatCompletionTool[];
}

- Defined in packages/prompt-registry/dist/client/prompt-registry/schema/template.d.ts:20

##### Index

### Properties

defaults?
response_format?
template
tools?

## Properties

### `Optional` defaults

defaults?: Record<string, string>

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

- Defined in packages/prompt-registry/dist/client/prompt-registry/schema/template.d.ts:28

### `Optional` response_format

response_format?:
| ResponseFormatText
| ResponseFormatJsonObject
| ResponseFormatJsonSchema

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

- Defined in packages/prompt-registry/dist/client/prompt-registry/schema/template.d.ts:33

### template

template: TemplatingChatMessage

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.

- Defined in packages/prompt-registry/dist/client/prompt-registry/schema/template.d.ts:24

### `Optional` tools

tools?: SchemasChatCompletionTool[]

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.

- Defined in packages/prompt-registry/dist/client/prompt-registry/schema/template.d.ts:38