MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / apply_chat_template

Method apply_chat_template

src/common/AutoModel/modeling_gpt_oss.cpp:42–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42std::string GPT_OSS::apply_chat_template(nlohmann::ordered_json& messages, nlohmann::ordered_json tools) {
43 minja::chat_template_inputs inputs;
44 inputs.add_generation_prompt = true;
45 inputs.messages = messages;
46 inputs.extra_context = this->extra_context;
47 inputs.extra_context["enable_thinking"] = this->enable_think;
48 inputs.extra_context["reasoning_effort"] = this->reasoning_effort;
49 inputs.extra_context["model_identity"] = this->model_identity;
50 inputs.extra_context["role"] = this->role;
51 //inputs.tools = tools;
52
53 return this->chat_tmpl->apply(inputs);
54}
55json tools;
56bool GPT_OSS::insert(chat_meta_info_t& meta_info, lm_uniform_input_t& input, std::function<bool()> is_cancelled)
57{

Callers 1

insertMethod · 0.95

Calls 1

applyMethod · 0.80

Tested by

no test coverage detected