mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-12-24 13:28:13 +08:00
Update backend_request_func.py (#5631)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user