From f4c2187e2967ef4052d173b422b0249ab9532753 Mon Sep 17 00:00:00 2001 From: Cyrus Leung Date: Fri, 8 Nov 2024 17:07:01 +0800 Subject: [PATCH] [Misc] Fix typo in #5895 (#10145) Signed-off-by: DarkLight1337 --- benchmarks/backend_request_func.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benchmarks/backend_request_func.py b/benchmarks/backend_request_func.py index 313ba819c87cb..25c8b1bbf3e22 100644 --- a/benchmarks/backend_request_func.py +++ b/benchmarks/backend_request_func.py @@ -256,7 +256,7 @@ async def async_request_openai_completions( async with session.post(url=api_url, json=payload, headers=headers) as response: if response.status == 200: - first_valid_chunk_received = False + first_chunk_received = False async for chunk_bytes in response.content: chunk_bytes = chunk_bytes.strip() if not chunk_bytes: @@ -275,7 +275,7 @@ async def async_request_openai_completions( if data["choices"][0]["text"]: timestamp = time.perf_counter() # First token - if not first_valid_chunk_received: + if not first_chunk_received: first_chunk_received = True ttft = time.perf_counter() - st output.ttft = ttft