Skip to content

Commit 836015d

Browse files
authored
Update examples/server/utils.hpp
1 parent cb7fe04 commit 836015d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/server/utils.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,8 @@ static json oaicompat_completion_params_parse(
642642
throw std::runtime_error("Cannot use custom grammar constraints with tools.");
643643
}
644644

645-
/* Prefill assistant message support */
645+
// if the assistant message appears at the end of list, we do not add end-of-turn token
646+
// for ex. this can be useful to modify the reasoning process in reasoning models
646647
bool prefill_assistant_message = !inputs.messages.empty() && inputs.messages.back().role == "assistant";
647648
common_chat_msg last_message;
648649
if (prefill_assistant_message) {

0 commit comments

Comments
 (0)