Skip to main content

openai.createchatcompletionprops.frequencypenalty

Home > @runlightyear/openai > CreateChatCompletionProps > frequencyPenalty

CreateChatCompletionProps.frequencyPenalty property

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.

Defaults to 0

Signature:
frequencyPenalty?: number;