mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	Fix test, but it's not asserting anything.
This commit is contained in:
		| @@ -152,32 +152,6 @@ static void test_regex() { | |||||||
|   } |   } | ||||||
| } | } | ||||||
|  |  | ||||||
| static void test_deepseek_v3_1() { |  | ||||||
|   // Test DeepSeek V3.1 parsing - reasoning content followed by "</think>" and then regular content |  | ||||||
|   { |  | ||||||
|     common_chat_syntax syntax = { |  | ||||||
|         /* .format = */ COMMON_CHAT_FORMAT_DEEPSEEK_V3_1, |  | ||||||
|         /* .reasoning_format = */ COMMON_REASONING_FORMAT_DEEPSEEK, |  | ||||||
|         /* .reasoning_in_content = */ false, |  | ||||||
|         /* .thinking_forced_open = */ false, |  | ||||||
|         /* .parse_tool_calls = */ true, |  | ||||||
|     }; |  | ||||||
|     common_chat_msg_parser builder("REASONING</think><function=finish>\n<parameter=message>ok |  | ||||||
| static void test_deepseek_v3_1() { |  | ||||||
|   // Test DeepSeek V3.1 parsing - reasoning content followed by "</think>" and then regular content |  | ||||||
|   { |  | ||||||
|     common_chat_syntax syntax = { |  | ||||||
|         /* .format = */ COMMON_CHAT_FORMAT_DEEPSEEK_V3_1, |  | ||||||
|         /* .reasoning_format = */ COMMON_REASONING_FORMAT_DEEPSEEK, |  | ||||||
|         /* .reasoning_in_content = */ false, |  | ||||||
|         /* .thinking_forced_open = */ false, |  | ||||||
|         /* .parse_tool_calls = */ true, |  | ||||||
|     }; |  | ||||||
|     common_chat_msg_parser builder("REASONING</think><function=finish>\n<parameter=message>ok |  | ||||||
| static void test_deepseek_v3_1() { |  | ||||||
|   // Test DeepSeek V3.1 parsing - reasoning content followed by "</think>" and then regular content |  | ||||||
|   { |  | ||||||
|     common_chat_msg_parser builder("REASONING</think><function=finish>\n<parameter=message>ok |  | ||||||
| const std::vector<std::string> barely_healable_jsons = { | const std::vector<std::string> barely_healable_jsons = { | ||||||
|   "{", |   "{", | ||||||
|   "{\"", |   "{\"", | ||||||
| @@ -212,6 +186,21 @@ static void test(const std::string & input, bool is_partial, const std::vector<s | |||||||
|   assert_equals(is_partial, js->is_partial); |   assert_equals(is_partial, js->is_partial); | ||||||
|   assert_equals(expected, args_paths.size() == 1 && args_paths[0].empty() ? js->value.get<std::string>() : js->value.dump()); |   assert_equals(expected, args_paths.size() == 1 && args_paths[0].empty() ? js->value.get<std::string>() : js->value.dump()); | ||||||
| } | } | ||||||
|  |  | ||||||
|  | static void test_deepseek_v3_1() { | ||||||
|  |   // Test DeepSeek V3.1 parsing - reasoning content followed by "</think>" and then regular content | ||||||
|  |   { | ||||||
|  |     common_chat_syntax syntax = { | ||||||
|  |         /* .format = */ COMMON_CHAT_FORMAT_DEEPSEEK_V3_1, | ||||||
|  |         /* .reasoning_format = */ COMMON_REASONING_FORMAT_DEEPSEEK, | ||||||
|  |         /* .reasoning_in_content = */ false, | ||||||
|  |         /* .thinking_forced_open = */ false, | ||||||
|  |         /* .parse_tool_calls = */ true, | ||||||
|  |     }; | ||||||
|  |     common_chat_msg_parser builder("REASONING</think>ok", /* is_partial= */ false, {}); | ||||||
|  |   } | ||||||
|  | } | ||||||
|  |  | ||||||
| static void test_with_args(const std::string & input, const std::string & expected, bool parse_as_partial = true, bool is_partial = true) { | static void test_with_args(const std::string & input, const std::string & expected, bool parse_as_partial = true, bool is_partial = true) { | ||||||
|   common_chat_msg_parser builder(input, parse_as_partial, {}); |   common_chat_msg_parser builder(input, parse_as_partial, {}); | ||||||
|   auto js = builder.try_consume_json_with_dumped_args({{"args"}}, {}); |   auto js = builder.try_consume_json_with_dumped_args({{"args"}}, {}); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jesse CreateThis
					Jesse CreateThis