convert: qwen3-asr: put "language ..." output into thinking block (#32571)

* convert: qwen3-asr: put "language ..." output into thinking block

* convert: qwen3-asr: read the chat template from models/templates

The converter embedded its own copy of Qwen3-ASR.jinja. Read the
bundled file instead, as the Kimi-K3 and Kokoro converters do, so
the GGUF and test-chat share a single template.

---------

Co-authored-by: Pascal <admin@serveurperso.com>
This commit is contained in:
Xuan-Son NguyenandPascal authored and GitHub committed 2026-11-20 20:54:57 +01:00
1 parent a83d68b562
commit 9197945004
4 files changed
+46 -7

No files matched your search

+11 -5
View File
@@ -1327,11 +1327,17 @@ json server_task_result_cmpl_partial::to_json_oaicompat_resp() {
}
json server_task_result_cmpl_partial::to_json_oaicompat_asr() {
json event = json {
{"type", "transcript.text.delta"},
{"delta", content.text},
};
return event;
// only the parsed content is the transcript, e.g. the "language XXX" prefix of Qwen3-ASR is reasoning
json events = json::array();
for (const auto & diff : oaicompat_msg_diffs) {
if (!diff.content_delta.empty()) {
events.push_back({
{"type", "transcript.text.delta"},
{"delta", diff.content_delta},
});
}
}
return events;
}
json server_task_result_cmpl_partial::to_json_anthropic() {