Skip to main content

openai.createcompletionprops.topp

Home > @runlightyear/openai > CreateCompletionProps > topP

CreateCompletionProps.topP property

Defaults to 1 An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with topP probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

We generally recommend altering this or temperature but not both.

Signature:
topP?: number;