Skip to content

Commit 1500690

Browse files
authored
text is stored in content_parts
1 parent e8f8c2c commit 1500690

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/server/utils.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,9 +779,9 @@ static json oaicompat_chat_params_parse(
779779

780780
/* Append assistant prefilled message */
781781
if (prefill_assistant_message) {
782-
if (last_message.content.is_array()) {
783-
for (auto & p : last_message.content) {
784-
chat_params.prompt += p["text"];
782+
if (!last_message.content_parts.empty()) {
783+
for (auto & p : last_message.content_parts) {
784+
chat_params.prompt += p.text;
785785
}
786786
} else {
787787
chat_params.prompt += last_message.content;

0 commit comments

Comments
 (0)