Skip to content

Commit 9acfada

Browse files
committed
Get a test working
1 parent 1063988 commit 9acfada

File tree

5 files changed

+425
-11
lines changed

5 files changed

+425
-11
lines changed

common/chat-parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ bool common_chat_msg_parser::add_tool_calls(const json & arr) {
7777
}
7878
void common_chat_msg_parser::finish() {
7979
if (!is_partial_ && pos_ != input_.size()) {
80-
throw std::runtime_error("Unexpected content at end of input");// + input_.substr(pos_));
80+
//throw std::runtime_error("Unexpected content at end of input");// + input_.substr(pos_));
81+
throw std::runtime_error("Unexpected content at end of input" + input_.substr(pos_));
8182
}
8283
}
8384

common/parsers/harmony.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,5 @@ harmony_msg_parser::harmony_msg_parser(common_chat_msg_parser & builder)
99
void harmony_msg_parser::parse() {
1010
// TODO @ngxson : this won't work with --special enabled, we should fix that
1111
builder.try_parse_reasoning("<|channel|>analysis<|message|>", "<|start|>assistant<|channel|>final<|message|>");
12-
if (!builder.syntax().parse_tool_calls) {
13-
builder.add_content(builder.consume_rest());
14-
return;
15-
}
12+
builder.add_content(builder.consume_rest());
1613
}

0 commit comments

Comments
 (0)