text is stored in content_parts

This commit is contained in:
Sigbjørn Skjæret
2025-06-24 12:21:04 +02:00
committed by GitHub
parent e8f8c2c711
commit 1500690046

View File

@ -779,9 +779,9 @@ static json oaicompat_chat_params_parse(
/* Append assistant prefilled message */ /* Append assistant prefilled message */
if (prefill_assistant_message) { if (prefill_assistant_message) {
if (last_message.content.is_array()) { if (!last_message.content_parts.empty()) {
for (auto & p : last_message.content) { for (auto & p : last_message.content_parts) {
chat_params.prompt += p["text"]; chat_params.prompt += p.text;
} }
} else { } else {
chat_params.prompt += last_message.content; chat_params.prompt += last_message.content;