common : fix improper trimming in XML parser on complete message (#19805)
Co-authored-by: Jules LEIDELINGER <11395311+julio75012@users.noreply.github.com>
This commit is contained in:
co-authored by
Jules LEIDELINGER
parent
cacc371f99
commit
ed4837891d
@@ -803,7 +803,7 @@ inline void parse_msg_with_xml_tool_calls(common_chat_msg_parser & builder, cons
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove potential partial suffix
|
// remove potential partial suffix
|
||||||
if (builder.pos() == builder.input().size()) {
|
if (builder.pos() == builder.input().size() && builder.is_partial()) {
|
||||||
if (unclosed_reasoning_content.empty()) {
|
if (unclosed_reasoning_content.empty()) {
|
||||||
rstrip(content);
|
rstrip(content);
|
||||||
trim_potential_partial_word(content);
|
trim_potential_partial_word(content);
|
||||||
|
|||||||
Reference in New Issue
Block a user