Skip to content

Commit 52d5488

Browse files
committed
Passing test
1 parent a32cad1 commit 52d5488

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/test-chat-parser.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -210,17 +210,17 @@ static void test_deepseek_v3_1_tool_calls() {
210210
/* .format = */ COMMON_CHAT_FORMAT_DEEPSEEK_V3_1,
211211
/* .reasoning_format = */ COMMON_REASONING_FORMAT_DEEPSEEK,
212212
/* .reasoning_in_content = */ false,
213-
/* .thinking_forced_open = */ true,
213+
/* .thinking_forced_open = */ false,
214214
/* .parse_tool_calls = */ true,
215215
};
216216
const std::string input = "<|tool▁calls▁begin|><|tool▁call▁begin|>get_time<|tool▁sep|>{\"city\": \"Tokyo\"}<|tool▁call▁end|><|tool▁calls▁end|>";
217-
common_chat_msg_parser builder(input, false, syntax);
218-
assert_equals(1u, builder.result().tool_calls.size());
219-
assert_equals(std::string("get_time"), builder.result().tool_calls[0].name);
217+
auto msg = common_chat_parse(input, false, syntax);
218+
assert_equals(static_cast<std::size_t>(1), msg.tool_calls.size());
219+
assert_equals(std::string("get_time"), msg.tool_calls[0].name);
220220
// JSON arguments are dumped without spaces
221-
assert_equals(std::string("{\"city\":\"Tokyo\"}"), builder.result().tool_calls[0].arguments);
222-
assert_equals(std::string(""), builder.result().content);
223-
assert_equals(std::string(""), builder.result().reasoning_content);
221+
assert_equals(std::string("{\"city\":\"Tokyo\"}"), msg.tool_calls[0].arguments);
222+
assert_equals(std::string(""), msg.content);
223+
assert_equals(std::string(""), msg.reasoning_content);
224224
}
225225

226226
static void test_with_args(const std::string & input, const std::string & expected, bool parse_as_partial = true, bool is_partial = true) {

0 commit comments

Comments
 (0)