[Feature] integrate Structural Tag in xgrammar backend for function calling (#3566)

Co-authored-by: shuaills <shishuaiuoe@gmail.com>
This commit is contained in:
mlmz
2025-02-28 15:33:41 +08:00
committed by GitHub
parent eec3f6d1eb
commit bac414ab53
5 changed files with 44 additions and 1 deletions

View File

@@ -45,6 +45,7 @@ class SamplingParams:
json_schema: Optional[str] = None,
regex: Optional[str] = None,
ebnf: Optional[str] = None,
structural_tag: Optional[str] = None,
no_stop_trim: bool = False,
ignore_eos: bool = False,
skip_special_tokens: bool = True,
@@ -72,6 +73,7 @@ class SamplingParams:
self.n = n
self.json_schema = json_schema
self.ebnf = ebnf
self.structural_tag = structural_tag
self.no_stop_trim = no_stop_trim
self.return_hidden_states = return_hidden_states
self.custom_params = custom_params