Skip to main content

Module prompt

Module prompt 

Source
Expand description

Checkpoint-owned Jinja formatting, compiled once when the tokenizer loads.

Structsยง

ChatTemplate ๐Ÿ”’
Prompt ๐Ÿ”’

Functionsยง

common_prefix ๐Ÿ”’
embedded_template ๐Ÿ”’
ensure_reasoning_content_absent ๐Ÿ”’
function_call_name_and_arguments ๐Ÿ”’
Validate a function reference and decode its arguments into the object the checkpoint template iterates. Fresh requests carry the wire form (a JSON string); retained session history carries the decoded object.
normalize_content ๐Ÿ”’
Validate typed parts and keep only the fields used by their declared type. The checkpoint template checks media keys before text, so extra fields must not reach it and change a text part into an image or video placeholder.
text_messages ๐Ÿ”’
tool_call_value ๐Ÿ”’
valid_function_name ๐Ÿ”’
Names accepted on the wire; the tokenizer side uses a longer bound for model-emitted names.
validate_assistant_message ๐Ÿ”’
validate_plain_message ๐Ÿ”’
validate_tool_message ๐Ÿ”’