fix test-chat
This commit is contained in:
parent
1f5ec59809
commit
438ce0b8a1
2 changed files with 10 additions and 11 deletions
|
@ -140,7 +140,6 @@ static common_chat_msg parse_json_tool_calls(
|
||||||
LOG_WRN("Content found with tool calls: %s", result.content.c_str());
|
LOG_WRN("Content found with tool calls: %s", result.content.c_str());
|
||||||
}
|
}
|
||||||
result.content = "";
|
result.content = "";
|
||||||
result.role = "user";
|
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -465,18 +465,18 @@ static void test_template_output_parsers() {
|
||||||
" ]\n"
|
" ]\n"
|
||||||
"}");
|
"}");
|
||||||
}
|
}
|
||||||
// {
|
{
|
||||||
// const common_chat_template tmpl(read_file("models/templates/mistralai-Mistral-Nemo-Instruct-2407.jinja"), "<s>",
|
const common_chat_template tmpl(read_file("models/templates/mistralai-Mistral-Nemo-Instruct-2407.jinja"), "<s>",
|
||||||
// "</s>");
|
"</s>");
|
||||||
// std::vector<std::string> end_tokens{ "</s>" };
|
std::vector<std::string> end_tokens{ "</s>" };
|
||||||
|
|
||||||
// assert_equals(COMMON_CHAT_FORMAT_MISTRAL_NEMO, common_chat_params_init(tmpl, inputs_tools).format);
|
assert_equals(COMMON_CHAT_FORMAT_MISTRAL_NEMO, common_chat_params_init(tmpl, inputs_tools).format);
|
||||||
|
|
||||||
// test_template(tmpl, end_tokens, text_message, tools, "Hello, world!", /* expect_grammar_triggered= */ false);
|
test_template(tmpl, end_tokens, text_message, tools, "Hello, world!", /* expect_grammar_triggered= */ false);
|
||||||
// test_template(
|
test_template(
|
||||||
// tmpl, end_tokens, tool_call_message_with_id, tools,
|
tmpl, end_tokens, tool_call_message_with_id, tools,
|
||||||
// "[TOOL_CALLS][{\"name\": \"special_function\", \"arguments\": {\"arg1\": 1}, \"id\": \"123456789\"}]");
|
"[TOOL_CALLS][{\"name\": \"special_function\", \"arguments\": {\"arg1\": 1}, \"id\": \"123456789\"}]");
|
||||||
// }
|
}
|
||||||
{
|
{
|
||||||
const common_chat_template tmpl(
|
const common_chat_template tmpl(
|
||||||
read_file("models/templates/NousResearch-Hermes-2-Pro-Llama-3-8B-tool_use.jinja"), "<s>", "</s>");
|
read_file("models/templates/NousResearch-Hermes-2-Pro-Llama-3-8B-tool_use.jinja"), "<s>", "</s>");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue