Table of Contents

Method ApplyChatTemplate

Namespace
Qavren.Edge.Chat
Assembly
Qavren.Edge.Chat.Onnx.dll

ApplyChatTemplate(string, bool)

Runs the model's own Jinja template through minja.

string ApplyChatTemplate(string messagesJson, bool addGenerationPrompt)

Parameters

messagesJson string

A JSON array of {"role","content"}.

addGenerationPrompt bool

Whether to append the assistant turn header.

Returns

string

The formatted prompt.

Exceptions

EdgeChatException

ChatTemplateUnsupported.