Skip to content

Commit 79eb825

Browse files
author
matteo
committed
simplify method usage
1 parent 496f08e commit 79eb825

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ static json oaicompat_completion_params_parse(
643643
}
644644

645645
/* Prefill assistant message support */
646-
bool prefill_assistant_message = inputs.messages.size() > 0 && inputs.messages[inputs.messages.size()-1].role == "assistant";
646+
bool prefill_assistant_message = inputs.messages.size() > 0 && inputs.messages.back().role == "assistant";
647647
common_chat_msg last_message;
648648
if (prefill_assistant_message) {
649649
last_message = inputs.messages.back();

0 commit comments

Comments
 (0)