We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b152729 commit 56a14ddCopy full SHA for 56a14dd
common/chat-template.hpp
@@ -463,12 +463,8 @@ class chat_template {
463
{"messages", actual_messages},
464
{"add_generation_prompt", inputs.add_generation_prompt},
465
}));
466
- if (opts.use_bos_token) {
467
- context->set("bos_token", bos_token_);
468
- }
469
- if (opts.use_eos_token) {
470
- context->set("eos_token", eos_token_);
471
+ context->set("bos_token", opts.use_bos_token ? bos_token_ : "");
+ context->set("eos_token", opts.use_eos_token ? eos_token_ : "");
472
if (opts.define_strftime_now) {
473
auto now = inputs.now;
474
context->set("strftime_now", Value::callable([now](const std::shared_ptr<minja::Context> &, minja::ArgumentsValue & args) {
0 commit comments