fix bench serving bug (#4135)

This commit is contained in:
Lzhang-hub
2025-03-06 21:34:02 +08:00
committed by GitHub
parent 800bf018fb
commit 3a3918121f

View File

@@ -220,7 +220,7 @@ async def async_request_openai_completions(
most_recent_timestamp = timestamp
generated_text += data["choices"][0]["text"]
output_len = data.get("usage", {}).get(
output_len = (data.get("usage") or {}).get(
"completion_tokens", output_len
)