fix bench serving bug (#4135)
This commit is contained in:
@@ -220,7 +220,7 @@ async def async_request_openai_completions(
|
|||||||
|
|
||||||
most_recent_timestamp = timestamp
|
most_recent_timestamp = timestamp
|
||||||
generated_text += data["choices"][0]["text"]
|
generated_text += data["choices"][0]["text"]
|
||||||
output_len = data.get("usage", {}).get(
|
output_len = (data.get("usage") or {}).get(
|
||||||
"completion_tokens", output_len
|
"completion_tokens", output_len
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user