Skip to content

Commit 7cc7435

Browse files
committed
[CI] fix test_named_tool_use
Signed-off-by: chaunceyjiang <chaunceyjiang@gmail.com>
1 parent 85fee74 commit 7cc7435

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

tests/entrypoints/openai/test_completion_with_function_calling.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from ...utils import RemoteOpenAIServer
1414

1515
# any model with a chat template should work here
16-
MODEL_NAME = "Qwen/Qwen3-0.6B"
16+
MODEL_NAME = "/home/jovyan/qwen3-06b"
1717

1818
tools = [
1919
{
@@ -378,6 +378,7 @@ async def test_named_tool_use(
378378
messages=messages,
379379
max_completion_tokens=1000,
380380
tools=tools,
381+
temperature=0.0,
381382
tool_choice=tool_choice,
382383
)
383384
message = chat_completion.choices[0].message
@@ -388,7 +389,11 @@ async def test_named_tool_use(
388389

389390
messages.append({"role": "assistant", "content": json_string})
390391
messages.append(
391-
{"role": "user", "content": "Give me another one with a different name and age"}
392+
{
393+
"role": "user",
394+
"content": f"{json_string}"
395+
"Give me another one with a different name and age",
396+
}
392397
)
393398

394399
# streaming
@@ -399,6 +404,7 @@ async def test_named_tool_use(
399404
max_completion_tokens=1000,
400405
tools=tools,
401406
tool_choice=tool_choice,
407+
temperature=0.0,
402408
stream=True,
403409
)
404410

@@ -416,6 +422,7 @@ async def test_named_tool_use(
416422
# finish reason should only return in last block
417423
assert finish_reason_count == 1
418424
json2 = json.loads("".join(output))
425+
print(f"------------{json2}---------{json1}------")
419426
jsonschema.validate(instance=json2, schema=sample_json_schema)
420427
assert json1["name"] != json2["name"]
421428
assert json1["age"] != json2["age"]

0 commit comments

Comments
 (0)