diff --git a/src/model.py b/src/model.py index 7cbc2888..d80ca81d 100644 --- a/src/model.py +++ b/src/model.py @@ -179,7 +179,11 @@ async def generate(self, request): ).as_numpy()[0] if isinstance(prompt, bytes): prompt = prompt.decode("utf-8") - stream = pb_utils.get_input_tensor_by_name(request, "stream").as_numpy()[0] + stream = pb_utils.get_input_tensor_by_name(request, "stream") + if stream: + stream = stream.as_numpy()[0] + else: + stream = False # Request parameters are not yet supported via # BLS. Provide an optional mechanism to receive serialized