Update backend_request_func.py (#5631)

This commit is contained in:
Zhang Yulong
2025-12-18 14:20:17 +08:00
committed by GitHub
parent 8735cb5045
commit c89a62e550

View File

@@ -250,7 +250,7 @@ async def async_request_eb_openai_chat_completions(
# response首token
if res_ttft == 0.0:
if content:
res_ttft = choices[0]["arrival_time"]
res_ttft = choices[0].get("arrival_time", timestamp)
output.res_ttft = res_ttft
usage = data.get("usage", {})
output.reasoning_tokens = max(usage.get("completion_tokens", 0) - 1, 0)