[Core][V0] Add guidance backend for structured output (#14589)

Signed-off-by: Russell Bryant <rbryant@redhat.com>
Co-authored-by: Loc Huynh <lohuynh@microsoft.com>
Co-authored-by: Michal Moskal <michal@moskal.me>
Co-authored-by: Aaron Pham <contact@aarnphm.xyz>
This commit is contained in:
Russell Bryant
2025-03-20 00:33:51 -04:00
committed by GitHub
parent b88be22165
commit 1f16b7fe74
8 changed files with 167 additions and 13 deletions

View File

@@ -2785,7 +2785,9 @@ class DecodingConfig:
return hash_str
def __post_init__(self):
valid_guided_backends = ['outlines', 'lm-format-enforcer', 'xgrammar']
valid_guided_backends = [
'outlines', 'lm-format-enforcer', 'xgrammar', 'guidance'
]
backend = GuidedDecodingParams(
backend=self.guided_decoding_backend).backend_name