xgrammar.StructuralTagItem

class xgrammar.StructuralTagItem(*, begin: str, schema: Union[str, Type[BaseModel], Dict[str, Any]], end: str)[source]

Bases: BaseModel

A structural tag item. See Grammar.from_structural_tag() for more details.

begin: str

The begin tag.

end: str

The end tag.

schema_: Union[str, Type[BaseModel], Dict[str, Any]]

The schema.