Allow input_ids in the input of the /generate endpoint (#363)

This commit is contained in:
Shannon Shen
2024-05-12 12:29:00 -10:00
committed by GitHub
parent 6e09cf6a15
commit 04c0b21488
5 changed files with 43 additions and 10 deletions

View File

@@ -8,6 +8,8 @@ The `/generate` endpoint accepts the following arguments in the JSON format.
class GenerateReqInput:
# The input prompt
text: Union[List[str], str]
# 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
image_data: Optional[Union[List[str], str]] = None
# The sampling_params