Skip to main content

ClikaRT::tokenizer::ChatTemplateOptions

struct

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 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

std::optional<std::string_view> chat_template

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

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

apply_polyfills

std::optional<bool> apply_polyfills

master tri-state for the compat polyfills below

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

use_bos_token

std::optional<bool> use_bos_token

force bos on/off for this render

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

use_eos_token

std::optional<bool> use_eos_token

force eos on/off for this render

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

define_strftime_now

std::optional<bool> define_strftime_now

expose strftime_now() to the template

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

polyfill_tools

std::optional<bool> polyfill_tools

inject tool declarations for a template without native tools

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

polyfill_tool_call_examples

std::optional<bool> polyfill_tool_call_examples

include worked tool-call examples in the injected tools block

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

polyfill_tool_calls

std::optional<bool> polyfill_tool_calls

render assistant tool_calls turns for a template lacking them

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

polyfill_tool_responses

std::optional<bool> polyfill_tool_responses

render tool-response turns likewise

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

polyfill_system_role

std::optional<bool> polyfill_system_role

fold a system message into a template lacking the role

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

polyfill_object_arguments

std::optional<bool> polyfill_object_arguments

pass tool arguments as objects, not JSON strings

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

polyfill_typed_content

std::optional<bool> polyfill_typed_content

flatten typed content parts for plain-text templates

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