We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 812544a commit d44eb95Copy full SHA for d44eb95
common/chat.cpp
@@ -134,6 +134,14 @@ static common_chat_msg parse_json_tool_calls(
134
it = match.suffix().first;
135
result.tool_calls.push_back({name, arguments.is_string() ? arguments.get<std::string>() : arguments.dump(), /* id= */ ""});
136
}
137
+
138
+ if (!result.tool_calls.empty()) {
139
+ if (!string_trim(result.content).empty()) {
140
+ LOG_WRN("Content found with tool calls: %s", result.content.c_str());
141
+ }
142
+ result.content = "";
143
+ result.role = "user";
144
145
return result;
146
147
0 commit comments