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

    Type Alias PromptTemplate

    PromptTemplate: Omit<Template, "template"> & {
        template?: TemplatingChatMessage;
    }

    Representation of the 'Template' schema. Includes tools and response_format inherited from the base template type.

    Type Declaration

    • Optionaltemplate?: TemplatingChatMessage

      A chat message array to be formatted with values from placeholderValues. Both role and content can use {{?variable}} placeholders.

      For dynamic templating (changing per request), pass templated messages directly in .chatCompletion({ messages }).

      // Static template: passed once in client config
      templating: {
      template: [
      {
      role: 'system',
      content: 'You are a helpful assistant for {{?product}}.'
      }
      ]
      }

    tools and response_format are fixed at construction time; create a new OrchestrationClient to use different tools or response format for a request. tool_choice is not part of the Orchestration Service template schema. You can pass it as a model-specific parameter not specified in LlmModelParams, but behavior depends on the underlying model provider.