[Test] Handle streaming chunks with null content in case of stream end. (#10862)
Co-authored-by: svc_repro_tool <svc_repro_tool@habana.ai>
This commit is contained in:
co-authored by
svc_repro_tool
parent
5f662e786f
commit
14a339fcc8
@@ -128,6 +128,10 @@ class TestSageMakerServer(CustomTestCase):
|
|||||||
is_firsts[index] = False
|
is_firsts[index] = False
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# Skip chunks that are just empty placeholders, usually at stream end/stop
|
||||||
|
if data.get("content") is None:
|
||||||
|
continue
|
||||||
|
|
||||||
if logprobs:
|
if logprobs:
|
||||||
assert line.get("choices")[0].get("logprobs")
|
assert line.get("choices")[0].get("logprobs")
|
||||||
assert isinstance(
|
assert isinstance(
|
||||||
|
|||||||
Reference in New Issue
Block a user