Skip to main content

openai.createcompletionprops.presencepenalty

Home > @runlightyear/openai > CreateCompletionProps > presencePenalty

CreateCompletionProps.presencePenalty property

Defaults to 0 Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.

See more information about frequency and presence penalties.

Signature:
presencePenalty?: number;