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:
Michael Conrad 2024-07-12 16:22:23 -04:00 committed by GitHub
parent dbb23fbfa8
commit 5b27307438
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ impl Validation {
// for the user
let top_p = top_p
.map(|value| {
if value <= 0.0 || value >= 1.0 {
if value < 0.0 || value > 1.0 {
return Err(ValidationError::TopP);
}
Ok(value)