Skip to content

Commit d714736

Browse files
committed
Update documentation for repetition_penalty
1 parent 8cc787e commit d714736

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/openai_api_protocols/chat_completion.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ export interface ChatCompletionRequestBase {
126126
presence_penalty?: number | null;
127127

128128
/**
129-
* Number greater than or equal to 1.0. Values greater than 1.0 discourage
130-
* the model from repeating tokens that have already been generated. Repetition
131-
* penalty is like presence penalty but is multiplicative.
129+
* Penalizes new tokens based on whether they appear in the prompt and the
130+
* generated text so far. Values greater than 1.0 encourage the model to use new
131+
* tokens, while values less than 1.0 encourage the model to repeat tokens.
132132
*/
133133
repetition_penalty?: number | null;
134134

src/openai_api_protocols/completion.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,9 @@ export interface CompletionCreateParamsBase {
138138
presence_penalty?: number | null;
139139

140140
/**
141-
* Number greater than or equal to 1.0. Values greater than 1.0 discourage
142-
* the model from repeating tokens that have already been generated. Repetition
143-
* penalty is like presence penalty but is multiplicative.
141+
* Penalizes new tokens based on whether they appear in the prompt and the
142+
* generated text so far. Values greater than 1.0 encourage the model to use new
143+
* tokens, while values less than 1.0 encourage the model to repeat tokens.
144144
*/
145145
repetition_penalty?: number | null;
146146

0 commit comments

Comments
 (0)