From fec2d1223c82f5701a384030c842dc92e0543e22 Mon Sep 17 00:00:00 2001 From: wangchao Date: Tue, 10 Sep 2024 16:17:37 +0800 Subject: [PATCH] [Fix] fix bug of `undefined is_single` in meth `create_abort_task` (#1370) --- python/sglang/srt/managers/io_struct.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/sglang/srt/managers/io_struct.py b/python/sglang/srt/managers/io_struct.py index 8e53df335..f5279eb8d 100644 --- a/python/sglang/srt/managers/io_struct.py +++ b/python/sglang/srt/managers/io_struct.py @@ -53,6 +53,8 @@ class GenerateReqInput: # The modalities of the image data [image, multi-images, video] modalities: Optional[List[str]] = None + is_single: bool = True + def post_init(self): if (self.text is None and self.input_ids is None) or ( self.text is not None and self.input_ids is not None @@ -194,6 +196,8 @@ class EmbeddingReqInput: # Dummy sampling params for compatibility sampling_params: Union[List[Dict], Dict] = None + is_single: bool = True + def post_init(self): if (self.text is None and self.input_ids is None) or ( self.text is not None and self.input_ids is not None