Skip to content

Commit 043cb99

Browse files
ochafikggerganov
andauthored
Apply suggestions from code review
Co-authored-by: Georgi Gerganov <[email protected]>
1 parent 4700245 commit 043cb99

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

common/chat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static common_chat_msg parse_json_tool_calls(
127127

128128
if (!result.tool_calls.empty()) {
129129
if (!string_strip(result.content).empty()) {
130-
LOG_WRN("Content found with tool calls: %s", result.content.c_str());
130+
LOG_WRN("Content found with tool calls: %s\n", result.content.c_str());
131131
}
132132
result.content = "";
133133
}
@@ -982,7 +982,7 @@ common_chat_params common_chat_params_init(const common_chat_template & tmpl, co
982982
throw std::runtime_error("Cannot specify grammar with tools");
983983
}
984984
if (caps.supports_tool_calls && !caps.supports_tools) {
985-
LOG_WRN("Template supports tool calls but does not natively describe tools. The fallback behaviour used may produce bad results, inspect prompt w/ --verbose & consider overriding the template.");
985+
LOG_WRN("Template supports tool calls but does not natively describe tools. The fallback behaviour used may produce bad results, inspect prompt w/ --verbose & consider overriding the template.\n");
986986
}
987987
}
988988

examples/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ struct server_task_result_cmpl_final : server_task_result {
731731
if (!msg.reasoning_content.empty()) {
732732
message["reasoning_content"] = msg.reasoning_content;
733733
}
734-
if (msg.content == "" && !msg.tool_calls.empty()) {
734+
if (msg.content.empty() && !msg.tool_calls.empty()) {
735735
message["content"] = json();
736736
} else {
737737
message["content"] = msg.content;

0 commit comments

Comments
 (0)