make json_schema usable from gen (#1254)

This commit is contained in:
Enrique Shockwave
2024-08-29 02:57:10 +01:00
committed by GitHub
parent 13ac95b894
commit 6c34d6339c
3 changed files with 8 additions and 0 deletions

View File

@@ -78,6 +78,7 @@ def gen(
choices: Optional[List[str]] = None,
choices_method: Optional[ChoicesSamplingMethod] = None,
regex: Optional[str] = None,
json_schema: Optional[str] = None,
):
"""Call the model to generate. See the meaning of the arguments in docs/en/sampling_params.md"""
@@ -114,6 +115,7 @@ def gen(
return_text_in_logprobs,
dtype,
regex,
json_schema,
)