Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
6d243efe
Unverified
Commit
6d243efe
authored
Aug 17, 2025
by
Woosuk Kwon
Committed by
GitHub
Aug 17, 2025
Browse files
[Misc] Convert use_structured_output property into constant (#23060)
Signed-off-by:
Woosuk Kwon
<
woosuk.kwon@berkeley.edu
>
parent
c55bc1db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
vllm/v1/request.py
vllm/v1/request.py
+4
-7
No files found.
vllm/v1/request.py
View file @
6d243efe
...
...
@@ -54,8 +54,7 @@ class Request:
time
.
time
()
self
.
status
=
RequestStatus
.
WAITING
if
sampling_params
and
sampling_params
.
guided_decoding
is
not
None
:
self
.
status
=
RequestStatus
.
WAITING_FOR_FSM
self
.
use_structured_output
=
False
self
.
events
:
list
[
EngineCoreEvent
]
=
[]
self
.
stop_reason
:
Union
[
int
,
str
,
None
]
=
None
...
...
@@ -63,12 +62,15 @@ class Request:
self
.
kv_transfer_params
:
Optional
[
dict
[
str
,
Any
]]
=
None
if
pooling_params
is
not
None
:
# Pooling models.
self
.
max_tokens
=
1
elif
sampling_params
is
not
None
:
# Generative models.
assert
sampling_params
.
max_tokens
is
not
None
self
.
max_tokens
=
sampling_params
.
max_tokens
if
sampling_params
.
guided_decoding
is
not
None
:
self
.
status
=
RequestStatus
.
WAITING_FOR_FSM
self
.
use_structured_output
=
True
if
sampling_params
.
extra_args
is
not
None
:
self
.
kv_transfer_params
=
\
...
...
@@ -192,11 +194,6 @@ class Request:
num_tokens
=
self
.
mm_positions
[
input_id
].
length
return
num_tokens
@
property
def
use_structured_output
(
self
)
->
bool
:
return
self
.
sampling_params
is
not
None
and
\
self
.
sampling_params
.
guided_decoding
is
not
None
def
record_event
(
self
,
event_type
:
EngineCoreEventType
,
...
...
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