| 46 | } |
| 47 | |
| 48 | std::string Gemma3_Text_Only::apply_chat_template(nlohmann::ordered_json& messages, nlohmann::ordered_json tools) { |
| 49 | minja::chat_template_inputs inputs; |
| 50 | inputs.add_generation_prompt = true; |
| 51 | inputs.messages = messages; |
| 52 | inputs.extra_context = this->extra_context; |
| 53 | return this->chat_tmpl->apply(inputs); |
| 54 | } |
| 55 | |
| 56 | bool Gemma3_Text_Only::insert(chat_meta_info_t& meta_info, lm_uniform_input_t& input, std::function<bool()> is_cancelled) { |
| 57 | // preprocess |