Skip to content

Commit

Permalink
Merge pull request #7 from beyera/b/completion-penalty-parms
Browse files Browse the repository at this point in the history
fix: use float for completion penalty parms
  • Loading branch information
rellfy authored Jun 14, 2023
2 parents 866a99e + ef0e790 commit 318f80e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ 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<i8>,
pub presence_penalty: Option<f32>,
/// 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.
///
/// [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<i8>,
pub frequency_penalty: Option<f32>,
/// Generates `best_of` completions server-side and returns the "best" (the one with the highest log probability per token).
/// Results cannot be streamed.
///
Expand Down

0 comments on commit 318f80e

Please sign in to comment.