Skip to content

Commit 3711364

Browse files
authored
Update backend_request_func.py (#7991)
1 parent fa258f5 commit 3711364

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

benchmarks/backend_request_func.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,12 +491,15 @@ async def async_request_eb_openai_chat_completions(
491491
"arguments": "",
492492
}
493493

494+
if tc.get("id"):
495+
tool_call_buffer[idx]["id"] = tc["id"]
496+
494497
func = tc.get("function", {})
495498

496-
if "name" in func:
499+
if func.get("name"):
497500
tool_call_buffer[idx]["name"] = func["name"]
498501

499-
if "arguments" in func:
502+
if func.get("arguments"):
500503
tool_call_buffer[idx]["arguments"] += func["arguments"]
501504

502505
# 过滤 role / finish / usage 等空包,只用真正 token 包统计 TTFT/ITL。

0 commit comments

Comments
 (0)