Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
zhaoyu6
sglang
Commits
32a4141d
"vscode:/vscode.git/clone" did not exist on "06427dfab12b8cb149809ca17ddfa61c97b7b70e"
Unverified
Commit
32a4141d
authored
Sep 01, 2024
by
Enrique Shockwave
Committed by
GitHub
Sep 01, 2024
Browse files
Allow new lines during JSON generation (#1277)
parent
08360553
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/constrained/fsm_cache.py
python/sglang/srt/constrained/fsm_cache.py
+1
-1
No files found.
python/sglang/srt/constrained/fsm_cache.py
View file @
32a4141d
...
...
@@ -79,7 +79,7 @@ class FSMCache(BaseToolCache):
def
init_value
(
self
,
value
):
if
self
.
json_schema_mode
:
regex
=
build_regex_from_schema
(
value
)
regex
=
build_regex_from_schema
(
value
,
whitespace_pattern
=
r
"[\n\t ]*"
)
return
RegexGuide
(
regex
,
self
.
outlines_tokenizer
),
regex
else
:
return
RegexGuide
(
value
,
self
.
outlines_tokenizer
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment