diff --git a/clients/python/text_generation/types.py b/clients/python/text_generation/types.py index aa02d8d8..6a3652a4 100644 --- a/clients/python/text_generation/types.py +++ b/clients/python/text_generation/types.py @@ -87,8 +87,8 @@ class Parameters(BaseModel): @validator("top_p") def valid_top_p(cls, v): - if v is not None and (v <= 0 or v >= 1.0): - raise ValidationError("`top_p` must be > 0.0 and < 1.0") + if v is not None and (v <= 0 or v > 1.0): + raise ValidationError("`top_p` must be > 0.0 and <= 1.0") return v @validator("truncate")