Skip to content

Commit

Permalink
Forgot to notate validator as a classmethod.
Browse files Browse the repository at this point in the history
  • Loading branch information
Etelis committed Jun 3, 2024
1 parent f0334e5 commit 4a9f80a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions vllm/entrypoints/openai/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ def logit_bias_logits_processor(
)

@model_validator(mode='before')
@classmethod
def validate_stream_options(cls, values):
if values.get('stream_options') is not None and not values.get('stream'):
raise ValueError("stream_options can only be set if stream is true")
Expand Down

0 comments on commit 4a9f80a

Please sign in to comment.