---
title: "ClikaRT::tokenizer::ChatTemplateOptions"
sidebar_label: "ChatTemplateOptions"
description: "Per-call overrides for apply_chat_template / encode_chat. Every toggle is tri-state: unset keeps the template's standing behavior, set forces the value for THIS render only."
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--struct">struct</span>

**Header:** `ClikaRT/tokenizer/tokenizer.h`

Per-call overrides for `apply_chat_template` / `encode_chat`. Every toggle is tri-state: unset keeps the template's standing behavior, set forces the value for THIS render only. [`chat_template`](./ChatTemplateOptions.md#chat_template) swaps the template SOURCE for the call; it is parsed and capability-probed per render (keep the standing template for the hot path) and requires the tokenizer to carry a template, whose bos/eos binding the override inherits.

## Data members

### chat\_template {#chat_template}

<div class="api-signature">

`std::optional<std::string_view>` **`chat_template`**

</div>

Replacement template source for this render. Non-owning; keep the backing alive for the call.

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 120

</div>

### apply\_polyfills {#apply_polyfills}

<div class="api-signature">

`std::optional<bool>` **`apply_polyfills`**

</div>

master tri-state for the compat polyfills below

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 121

</div>

### use\_bos\_token {#use_bos_token}

<div class="api-signature">

`std::optional<bool>` **`use_bos_token`**

</div>

force bos on/off for this render

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 122

</div>

### use\_eos\_token {#use_eos_token}

<div class="api-signature">

`std::optional<bool>` **`use_eos_token`**

</div>

force eos on/off for this render

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 123

</div>

### define\_strftime\_now {#define_strftime_now}

<div class="api-signature">

`std::optional<bool>` **`define_strftime_now`**

</div>

expose strftime\_now() to the template

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 124

</div>

### polyfill\_tools {#polyfill_tools}

<div class="api-signature">

`std::optional<bool>` **`polyfill_tools`**

</div>

inject tool declarations for a template without native tools

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 125

</div>

### polyfill\_tool\_call\_examples {#polyfill_tool_call_examples}

<div class="api-signature">

`std::optional<bool>` **`polyfill_tool_call_examples`**

</div>

include worked tool-call examples in the injected tools block

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 126

</div>

### polyfill\_tool\_calls {#polyfill_tool_calls}

<div class="api-signature">

`std::optional<bool>` **`polyfill_tool_calls`**

</div>

render assistant tool\_calls turns for a template lacking them

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 127

</div>

### polyfill\_tool\_responses {#polyfill_tool_responses}

<div class="api-signature">

`std::optional<bool>` **`polyfill_tool_responses`**

</div>

render tool-response turns likewise

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 128

</div>

### polyfill\_system\_role {#polyfill_system_role}

<div class="api-signature">

`std::optional<bool>` **`polyfill_system_role`**

</div>

fold a system message into a template lacking the role

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 129

</div>

### polyfill\_object\_arguments {#polyfill_object_arguments}

<div class="api-signature">

`std::optional<bool>` **`polyfill_object_arguments`**

</div>

pass tool arguments as objects, not JSON strings

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 130

</div>

### polyfill\_typed\_content {#polyfill_typed_content}

<div class="api-signature">

`std::optional<bool>` **`polyfill_typed_content`**

</div>

flatten typed content parts for plain-text templates

<div class="api-declared">

Declared in `ClikaRT/tokenizer/tokenizer.h`, line 131

</div>
