mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-16 08:56:02 +08:00
[Bugfix][Benchmarks] Ensure async_request_deepspeed_mii uses the OpenAI choices key (#15926)
Signed-off-by: Brayden Zhong <b8zhong@uwaterloo.ca>
This commit is contained in:
parent
51826d51fa
commit
252937806c
@ -219,7 +219,15 @@ async def async_request_deepspeed_mii(
|
|||||||
if response.status == 200:
|
if response.status == 200:
|
||||||
parsed_resp = await response.json()
|
parsed_resp = await response.json()
|
||||||
output.latency = time.perf_counter() - st
|
output.latency = time.perf_counter() - st
|
||||||
output.generated_text = parsed_resp["text"][0]
|
if "choices" in parsed_resp:
|
||||||
|
output.generated_text = parsed_resp["choices"][0][
|
||||||
|
"text"]
|
||||||
|
elif "text" in parsed_resp:
|
||||||
|
output.generated_text = parsed_resp["text"][0]
|
||||||
|
else:
|
||||||
|
output.error = ("Unexpected response format: "
|
||||||
|
"neither 'choices' nor 'text' found")
|
||||||
|
output.success = False
|
||||||
output.success = True
|
output.success = True
|
||||||
else:
|
else:
|
||||||
output.error = response.reason or ""
|
output.error = response.reason or ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user