[Fix] the issue of random order when input is a list (#1199)

This commit is contained in:
Ying Sheng
2024-08-24 21:43:03 -07:00
committed by GitHub
parent e61d13acdf
commit 1cb4da5c5f
4 changed files with 23 additions and 20 deletions

View File

@@ -591,7 +591,7 @@ class Runtime:
def generate(
self,
prompt: str,
prompt: Union[str, List[str]],
sampling_params: Optional[Dict] = None,
return_logprob: Optional[Union[List[bool], bool]] = False,
logprob_start_len: Optional[Union[List[int], int]] = None,
@@ -612,7 +612,7 @@ class Runtime:
def encode(
self,
prompt: str,
prompt: Union[str, List[str]],
):
json_data = {
"text": prompt,