openai.createcompletionprops.bestof
Home > @runlightyear/openai > CreateCompletionProps > bestOf
CreateCompletionProps.bestOf property
Defaults to 1 Generates bestOf completions server-side and returns the "best" (the one with the highest log probability per token). Results cannot be streamed.
When used with n, bestOf controls the number of candidate completions and n specifies how many to return – bestOf must be greater than n.
Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for maxTokens and stop.
Signature:bestOf?: number;