Skip to main content

openai.createcompletionprops.frequencypenalty

Home > @runlightyear/openai > CreateCompletionProps > frequencyPenalty

CreateCompletionProps.frequencyPenalty property

Defaults to 0 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.

Signature:
frequencyPenalty?: number;