MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / common_chat_templates_source

Function common_chat_templates_source

common/chat.cpp:567–578  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567std::string common_chat_templates_source(const struct common_chat_templates * tmpls, const std::string & variant) {
568 if (!variant.empty()) {
569 if (variant == "tool_use") {
570 if (tmpls->template_tool_use) {
571 return tmpls->template_tool_use->source();
572 }
573 return "";
574 }
575 LOG_DBG("%s: unknown template variant: %s\n", __func__, variant.c_str());
576 }
577 return tmpls->template_default->source();
578}
579
580common_chat_templates_ptr common_chat_templates_init(const struct llama_model * model,
581 const std::string & chat_template_override,

Callers 1

init_routesMethod · 0.85

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected