Chat Template#
-
class ChatTemplate#
Public Functions
-
ChatTemplate()#
-
~ChatTemplate()#
-
ChatTemplate(ChatTemplate&&) noexcept#
-
ChatTemplate &operator=(ChatTemplate&&) noexcept#
-
ChatTemplate(ChatTemplate const&) = delete#
-
ChatTemplate &operator=(ChatTemplate const&) = delete#
- bool load(
- std::filesystem::path const &modelDir,
- std::string bosToken = {},
- std::string eosToken = {}
Load the provider Jinja templates or an explicit native-renderer marker.
- bool apply(
- rt::LLMGenerationRequest::Request const &request,
- rt::LLMGenerationRequest::FormattedRequest &formattedRequest,
- Options const &options
Render one structured conversation.
-
bool isLoaded() const noexcept#
Public Static Functions
-
static Options optionsFrom(rt::LLMGenerationRequest const &request)#
Translate the runtime request controls into renderer options.
-
class Impl#
Public Functions
- inline bool load(
- std::filesystem::path const &modelDir,
- std::string bosToken,
- std::string eosToken
- inline bool apply(
- rt::LLMGenerationRequest::Request const &request,
- rt::LLMGenerationRequest::FormattedRequest &formattedRequest,
- ChatTemplate::Options const &options
-
inline bool isLoaded() const noexcept#
-
struct Options#
-
ChatTemplate()#
-
struct Options
Public Members
-
bool applyTemplate = {true}
-
bool addGenerationPrompt = {true}
-
bool enableThinking = {false}
-
std::string reasoningEffort
-
std::vector<rt::ToolDefinition> tools
-
rt::ToolChoice toolChoice
-
bool parallelToolCalls = {true}
-
bool applyTemplate = {true}