Skip to content

Commit b53ea97

Browse files
aldehirjulio75012
authored andcommitted
common : fix improper trimming in XML parser on complete message (ggml-org#19805)
Co-authored-by: Jules LEIDELINGER <11395311+julio75012@users.noreply.github.com>
1 parent fe3321a commit b53ea97

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/chat-parser-xml-toolcall.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ inline void parse_msg_with_xml_tool_calls(common_chat_msg_parser & builder, cons
803803
}
804804

805805
// remove potential partial suffix
806-
if (builder.pos() == builder.input().size()) {
806+
if (builder.pos() == builder.input().size() && builder.is_partial()) {
807807
if (unclosed_reasoning_content.empty()) {
808808
rstrip(content);
809809
trim_potential_partial_word(content);

0 commit comments

Comments
 (0)