Skip to content

Commit 86994db

Browse files
author
ochafik
committed
fix spaces
1 parent 78b47bb commit 86994db

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

examples/server/tests/unit/test_tool_call.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ def test_weather_tool_call(hf_repo: str, template_override: str | Tuple[str, str
349349
(None, 128, "bartowski/Hermes-3-Llama-3.1-8B-GGUF:Q4_K_M", ("NousResearch/Hermes-3-Llama-3.1-8B", "tool_use")),
350350
(None, 128, "bartowski/functionary-small-v3.2-GGUF:Q8_0", ("meetkai/functionary-medium-v3.2", None)),
351351
(None, 128, "bartowski/Meta-Llama-3.1-8B-Instruct-GGUF:Q4_K_M", None),
352-
352+
353353
# TODO: fix these (wrong results, either didn't respect decimal instruction or got wrong value)
354354
("^So, 0\\.556442\\.", 128, "bartowski/Mistral-Nemo-Instruct-2407-GGUF:Q4_K_M", None),
355355
("[\\s\\S\\r\\n]*?\\b0\\.55644242476$", 128, "bartowski/Phi-3.5-mini-instruct-GGUF:Q4_K_M", None),
@@ -393,7 +393,7 @@ def test_calc_result(result_override: str | None, n_predict: int, hf_repo: str,
393393
]
394394
},
395395
{
396-
"role": "tool",
396+
"role": "tool",
397397
"name": "calculate",
398398
"content": 0.55644242476,
399399
"tool_call_id": "call_6789",
@@ -422,7 +422,7 @@ def test_calc_result(result_override: str | None, n_predict: int, hf_repo: str,
422422
assert res.status_code == 200, f"Expected status code 200, got {res.status_code}"
423423
choice = res.body["choices"][0]
424424
tool_calls = choice["message"].get("tool_calls")
425-
assert tool_calls is None, f'Expected no tool call in {choice["message"]}'
425+
assert tool_calls is None, f'Expected no tool call in {choice["message"]}'
426426
content = choice["message"].get("content")
427427
assert content is not None, f'Expected content in {choice["message"]}'
428428
if result_override is not None:
@@ -436,7 +436,7 @@ def test_calc_result(result_override: str | None, n_predict: int, hf_repo: str,
436436
@pytest.mark.parametrize("expected_arguments_override,hf_repo,template_override", [
437437
(None, "bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF:Q4_K_M", None),
438438
(None, "bartowski/DeepSeek-R1-Distill-Qwen-7B-GGUF:Q4_K_M", "chatml"),
439-
439+
440440
(None, "bartowski/Phi-3.5-mini-instruct-GGUF:Q4_K_M", None),
441441
(None, "bartowski/Phi-3.5-mini-instruct-GGUF:Q4_K_M", "chatml"),
442442

tests/test-chat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ static void test_template_output_parsers() {
598598
// // Look what's not here: <|tool▁calls▁end|> (also missing the <|end▁of▁sentence|>, but that is removed lazily by the test's delta logic)
599599
// "```<|tool▁call▁end|>",
600600
// /* expect_grammar_triggered= */ true,
601-
// /* test_grammar_if_triggered= */ false);
601+
// /* test_grammar_if_triggered= */ false);
602602
}
603603
{
604604
// Replacement DeepSeek R1 template. Makes the Distill Qwen 7B/32B models happy to call tools and all.
@@ -611,7 +611,7 @@ static void test_template_output_parsers() {
611611
test_template(tmpl, end_tokens, text_message, tools, "Hello, world!", /* expect_grammar_triggered= */ false);
612612
test_template(tmpl, end_tokens, text_thoughts_message, tools, "Hello, world!", /* expect_grammar_triggered= */ false);
613613
assert_msg_equals(msg_from_json(text_thoughts_message), common_chat_parse("<think>I'm thinking</think>Hello, world!", COMMON_CHAT_FORMAT_DEEPSEEK_R1));
614-
614+
615615
assert_msg_equals(msg_from_json(tool_call_thoughts_message),
616616
common_chat_parse(
617617
"<think>I'm\nthinking</think>\n\n"

0 commit comments

Comments
 (0)