[Fix] fix bug of undefined is_single in meth create_abort_task (#1370)
This commit is contained in:
@@ -53,6 +53,8 @@ class GenerateReqInput:
|
|||||||
# The modalities of the image data [image, multi-images, video]
|
# The modalities of the image data [image, multi-images, video]
|
||||||
modalities: Optional[List[str]] = None
|
modalities: Optional[List[str]] = None
|
||||||
|
|
||||||
|
is_single: bool = True
|
||||||
|
|
||||||
def post_init(self):
|
def post_init(self):
|
||||||
if (self.text is None and self.input_ids is None) or (
|
if (self.text is None and self.input_ids is None) or (
|
||||||
self.text is not None and self.input_ids is not None
|
self.text is not None and self.input_ids is not None
|
||||||
@@ -194,6 +196,8 @@ class EmbeddingReqInput:
|
|||||||
# Dummy sampling params for compatibility
|
# Dummy sampling params for compatibility
|
||||||
sampling_params: Union[List[Dict], Dict] = None
|
sampling_params: Union[List[Dict], Dict] = None
|
||||||
|
|
||||||
|
is_single: bool = True
|
||||||
|
|
||||||
def post_init(self):
|
def post_init(self):
|
||||||
if (self.text is None and self.input_ids is None) or (
|
if (self.text is None and self.input_ids is None) or (
|
||||||
self.text is not None and self.input_ids is not None
|
self.text is not None and self.input_ids is not None
|
||||||
|
|||||||
Reference in New Issue
Block a user