Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
780eb03d
Unverified
Commit
780eb03d
authored
Oct 14, 2025
by
Chauncey
Committed by
GitHub
Oct 14, 2025
Browse files
[CI] Fix test_tool_id_kimi_k2 (#26787)
Signed-off-by:
chaunceyjiang
<
chaunceyjiang@gmail.com
>
parent
ef9676a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
tests/entrypoints/openai/test_completion_with_function_calling.py
...trypoints/openai/test_completion_with_function_calling.py
+8
-5
No files found.
tests/entrypoints/openai/test_completion_with_function_calling.py
View file @
780eb03d
...
@@ -247,10 +247,10 @@ async def test_tool_id_kimi_k2(
...
@@ -247,10 +247,10 @@ async def test_tool_id_kimi_k2(
)
)
assert
chat_completion
.
choices
[
0
].
message
.
tool_calls
is
not
None
assert
chat_completion
.
choices
[
0
].
message
.
tool_calls
is
not
None
assert
len
(
chat_completion
.
choices
[
0
].
message
.
tool_calls
)
>
0
assert
len
(
chat_completion
.
choices
[
0
].
message
.
tool_calls
)
>
0
assert
(
assert
chat_completion
.
choices
[
0
].
message
.
tool_calls
[
0
].
id
in
[
chat_completion
.
choices
[
0
].
message
.
tool_calls
[
0
].
id
"functions.get_current_weather:0"
,
==
"functions.get_
current_weather:0"
"functions.get_
forecast:1"
,
)
]
else
:
else
:
# Streaming test
# Streaming test
output_stream
=
await
k2_client
.
chat
.
completions
.
create
(
output_stream
=
await
k2_client
.
chat
.
completions
.
create
(
...
@@ -266,7 +266,10 @@ async def test_tool_id_kimi_k2(
...
@@ -266,7 +266,10 @@ async def test_tool_id_kimi_k2(
if
chunk
.
choices
and
chunk
.
choices
[
0
].
delta
.
tool_calls
:
if
chunk
.
choices
and
chunk
.
choices
[
0
].
delta
.
tool_calls
:
output
.
extend
(
chunk
.
choices
[
0
].
delta
.
tool_calls
)
output
.
extend
(
chunk
.
choices
[
0
].
delta
.
tool_calls
)
for
o
in
output
:
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
@
pytest
.
mark
.
asyncio
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment