From ef0e790e380352190453f09b091960fb880e0c8b Mon Sep 17 00:00:00 2001 From: Andrew Beyer Date: Tue, 13 Jun 2023 09:19:26 -0600 Subject: [PATCH] fix: use float for completion penalty parms --- src/completions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/completions.rs b/src/completions.rs index 237aba8..9021d37 100644 --- a/src/completions.rs +++ b/src/completions.rs @@ -107,7 +107,7 @@ pub struct CompletionRequest { /// [See more information about frequency and presence penalties](https://beta.openai.com/docs/api-reference/parameter-details). #[serde(skip_serializing_if = "Option::is_none")] #[builder(default)] - pub presence_penalty: Option, + pub presence_penalty: Option, /// Number between -2.0 and 2.0. /// Positive values penalize new tokens based on their existing frequency in the text so far, /// decreasing the model's likelihood to repeat the same line verbatim. @@ -115,7 +115,7 @@ pub struct CompletionRequest { /// [See more information about frequency and presence penalties](https://beta.openai.com/docs/api-reference/parameter-details). #[serde(skip_serializing_if = "Option::is_none")] #[builder(default)] - pub frequency_penalty: Option, + pub frequency_penalty: Option, /// Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token). /// Results cannot be streamed. ///