[FEAT] JSON constrained support (#1125)
Co-authored-by: Yineng Zhang <me@zhyncs.com>
This commit is contained in:
@@ -60,6 +60,9 @@ spaces_between_special_tokens: bool = True,
|
||||
regex: Optional[str] = None,
|
||||
# Do parallel sampling and return `n` outputs.
|
||||
n: int = 1,
|
||||
# Constrains the output to follow a given JSON schema.
|
||||
# `regex` and `json_schema` cannot be set at the same time.
|
||||
json_schema: Optional[str] = None,
|
||||
|
||||
## Penalties. See [Performance Implications on Penalties] section below for more informations.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user