Fix illegal tokens during sampling (#676)

This commit is contained in:
Liangsheng Yin
2024-07-20 03:11:15 -07:00
committed by GitHub
parent 490a1f39dd
commit f424e76d96
4 changed files with 18 additions and 15 deletions

View File

@@ -7,7 +7,7 @@ The `/generate` endpoint accepts the following arguments in the JSON format.
@dataclass
class GenerateReqInput:
# The input prompt. It can be a single prompt or a batch of prompts.
text: Union[List[str], str]
text: Optional[Union[List[str], str]] = None
# The token ids for text; one can either specify text or input_ids.
input_ids: Optional[Union[List[List[int]], List[int]]] = None
# The image input. It can be a file name, a url, or base64 encoded string.