core: a speech model without instructions, and a refusal's reason from its text_prepare -- an audio generator may declare tmpl_plain alone (a request's instructions refused by name), and the reason a plugin leaves in the output buffer reaches the caller

This commit is contained in:
zivius committed 2026-10-20 23:07:33 +02:00
1 parent 61abb990ab
commit 832a88faac
7 files changed
+30 -9

No files matched your search

+3
View File
@@ -110,6 +110,9 @@ int Server::speech_request(const json& body, const std::string& text,
return fail(err_bad("instructions", "this model needs instructions, as a non-empty "
"string: for a song its genre, mood, vocals and "
"instruments"));
if (!inst.empty() && info.tmpl.empty())
return fail(err_unsupported("instructions", "this model takes no instructions; its "
"direction is written in the input"));
if (body.contains("speed") && !body["speed"].is_null() &&
!(body["speed"].is_number() && body["speed"].get<double>() == 1.0))
return fail(err_unsupported("speed", "this model keeps its own tempo; the instructions "