[BugFix]: fix EmbeddingReqInput single input error (#7396)

This commit is contained in:
woodx
2025-06-21 11:35:21 +08:00
committed by GitHub
parent ab74f8f09d
commit 9edf6608c9

View File

@@ -530,6 +530,7 @@ class EmbeddingReqInput:
if self.text is not None:
if isinstance(self.text, list):
self.batch_size += len(self.text)
self.is_single = False
else:
self.batch_size += 1
@@ -537,12 +538,10 @@ class EmbeddingReqInput:
if self.input_ids is not None:
if isinstance(self.input_ids[0], list):
self.batch_size += len(self.input_ids)
self.is_single = False
else:
self.batch_size += 1
if self.batch_size > 1:
self.is_single = False
# Fill in default arguments
if self.is_single:
if self.rid is None: