fix: use single-quote triple string for GBNF to avoid SyntaxError
Made-with: Cursor
This commit is contained in:
parent
545672c5aa
commit
9e89d5d3d7
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ __all__ = [
|
|||
]
|
||||
|
||||
# Simple JSON array grammar
|
||||
JSON_ARR_GBNF = r"""
|
||||
JSON_ARR_GBNF = r'''
|
||||
root ::= arr
|
||||
value ::= object | array | string | number | ("true" | "false" | "null") ws
|
||||
arr ::=
|
||||
|
|
@ -52,7 +52,7 @@ string ::=
|
|||
number ::= ("-"? ([0-9] | [1-9] [0-9]*)) ("." [0-9]+)? ([eE] [-+]? [0-9]+)? ws
|
||||
ws ::= ([
|
||||
] ws)?
|
||||
"""
|
||||
'''
|
||||
|
||||
def generate_with_grammar(
|
||||
model,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue