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
change
sglang
Commits
da504445
Unverified
Commit
da504445
authored
Jul 26, 2024
by
Toshiki Kataoka
Committed by
GitHub
Jul 26, 2024
Browse files
fix /generate without sampling_params (#734)
parent
252e0f7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
python/sglang/srt/managers/io_struct.py
python/sglang/srt/managers/io_struct.py
+1
-1
No files found.
python/sglang/srt/managers/io_struct.py
View file @
da504445
...
...
@@ -40,7 +40,7 @@ class GenerateReqInput:
self
.
text
is
not
None
and
self
.
input_ids
is
not
None
):
raise
ValueError
(
"Either text or input_ids should be provided."
)
if
self
.
sampling_params
.
get
(
"n"
,
1
)
!=
1
:
if
isinstance
(
self
.
sampling_params
,
dict
)
and
self
.
sampling_params
.
get
(
"n"
,
1
)
!=
1
:
is_single
=
False
else
:
if
self
.
text
is
not
None
:
...
...
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