MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / apply_chat_template

Method apply_chat_template

src/models/ace_step/tokenizer_text.cpp:102–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102std::string AceStepTextTokenizer::apply_chat_template(
103 const std::string & system_content,
104 const std::string & user_content,
105 bool add_generation_prompt) const {
106 std::string formatted = "<|im_start|>system\n" + system_content + "<|im_end|>\n"
107 "<|im_start|>user\n" + user_content + "<|im_end|>\n";
108 if (add_generation_prompt) {
109 formatted += "<|im_start|>assistant\n";
110 }
111 return formatted;
112}
113
114} // namespace engine::models::ace_step

Callers 4

prepare_phase1_promptFunction · 0.80
prepare_phase2_promptFunction · 0.80
runFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected