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

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

No files matched your search

@@ -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