Merge branch 'sync-minja-4' into r1-toolcall
This commit is contained in:
commit
d43e4f6c22
2 changed files with 3 additions and 7 deletions
|
@ -463,12 +463,8 @@ class chat_template {
|
|||
{"messages", actual_messages},
|
||||
{"add_generation_prompt", inputs.add_generation_prompt},
|
||||
}));
|
||||
if (opts.use_bos_token) {
|
||||
context->set("bos_token", bos_token_);
|
||||
}
|
||||
if (opts.use_eos_token) {
|
||||
context->set("eos_token", eos_token_);
|
||||
}
|
||||
context->set("bos_token", opts.use_bos_token ? bos_token_ : "");
|
||||
context->set("eos_token", opts.use_eos_token ? eos_token_ : "");
|
||||
if (opts.define_strftime_now) {
|
||||
auto now = inputs.now;
|
||||
context->set("strftime_now", Value::callable([now](const std::shared_ptr<minja::Context> &, minja::ArgumentsValue & args) {
|
||||
|
|
|
@ -175,7 +175,7 @@ static void foreach_function(const json & tools, const std::function<void(const
|
|||
}
|
||||
|
||||
static std::string apply(
|
||||
const common_chat_template & tmpl,
|
||||
const common_chat_template & tmpl,
|
||||
const nlohmann::ordered_json & messages,
|
||||
const nlohmann::ordered_json & tools,
|
||||
bool add_generation_prompt,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue