Skip to main content

//clika-runtime/io.clika.runtime/ChatTemplateInputs

ChatTemplateInputs

[common]
class ChatTemplateInputs(val messages: String, val tools: String? = null, val addGenerationPrompt: Boolean = true, val extraContext: String? = null, val nowEpochSeconds: Long = 0)

The full inputs of a chat render: the messages as a JSON array of {"role", "content", ...} turns (an assistant turn may carry tool_calls, a "tool" turn a tool response), the tools offered to the model as a JSON array of schemas (null for none), whether to append the assistant-turn priming (addGenerationPrompt), extraContext as a JSON object whose keys become template variables (null for none), and the fixed clock behind the template's strftime_now as Unix seconds, so a render is reproducible (0, the default, renders at the epoch).

Constructors​

ChatTemplateInputs[common]
constructor(messages: String, tools: String? = null, addGenerationPrompt: Boolean = true, extraContext: String? = null, nowEpochSeconds: Long = 0)

Properties​

NameSummary
addGenerationPrompt[common]
val addGenerationPrompt: Boolean = true
extraContext[common]
val extraContext: String? = null
messages[common]
val messages: String
nowEpochSeconds[common]
val nowEpochSeconds: Long = 0
tools[common]
val tools: String? = null