Unverified Commit 780eb03d authored by Chauncey's avatar Chauncey Committed by GitHub
Browse files

[CI] Fix test_tool_id_kimi_k2 (#26787)


Signed-off-by: default avatarchaunceyjiang <chaunceyjiang@gmail.com>
parent ef9676a1
......@@ -247,10 +247,10 @@ async def test_tool_id_kimi_k2(
)
assert chat_completion.choices[0].message.tool_calls is not None
assert len(chat_completion.choices[0].message.tool_calls) > 0
assert (
chat_completion.choices[0].message.tool_calls[0].id
== "functions.get_current_weather:0"
)
assert chat_completion.choices[0].message.tool_calls[0].id in [
"functions.get_current_weather:0",
"functions.get_forecast:1",
]
else:
# Streaming test
output_stream = await k2_client.chat.completions.create(
......@@ -266,7 +266,10 @@ async def test_tool_id_kimi_k2(
if chunk.choices and chunk.choices[0].delta.tool_calls:
output.extend(chunk.choices[0].delta.tool_calls)
for o in output:
assert o.id is None or o.id == "functions.get_current_weather:0"
assert o.id is None or o.id in [
"functions.get_current_weather:0",
"functions.get_forecast:1",
]
@pytest.mark.asyncio
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment