server : fix assistant prefilling when content is an array (#14360)

This commit is contained in:
Sigbjørn Skjæret authored and GitHub committed 2025-07-05 09:17:14 +02:00
1 parent 6681688146
commit ddef99522d
2 files changed
+30 -1

No files matched your search

+7 -1
View File
@@ -792,7 +792,13 @@ static json oaicompat_chat_params_parse(
/* Append assistant prefilled message */
if (prefill_assistant_message) {
chat_params.prompt += last_message.content;
if (!last_message.content_parts.empty()) {
for (auto & p : last_message.content_parts) {
chat_params.prompt += p.text;
}
} else {
chat_params.prompt += last_message.content;
}
}
llama_params["chat_format"] = static_cast<int>(chat_params.format);