Unverified Commit 9edf6608 authored by woodx's avatar woodx Committed by GitHub
Browse files

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

parent ab74f8f0
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment