Don't error on OpenAI valid `top_p` values.
Don't error on OpenAI `top_p` valid values. * Closes: https://github.com/guidance-ai/guidance/issues/945 * Closes: https://github.com/huggingface/text-generation-inference/issues/2222
This commit is contained in:
parent
dbb23fbfa8
commit
5b27307438
|
@ -247,7 +247,7 @@ impl Validation {
|
||||||
// for the user
|
// for the user
|
||||||
let top_p = top_p
|
let top_p = top_p
|
||||||
.map(|value| {
|
.map(|value| {
|
||||||
if value <= 0.0 || value >= 1.0 {
|
if value < 0.0 || value > 1.0 {
|
||||||
return Err(ValidationError::TopP);
|
return Err(ValidationError::TopP);
|
||||||
}
|
}
|
||||||
Ok(value)
|
Ok(value)
|
||||||
|
|
Loading…
Reference in New Issue