Skip to main content

openai.createcompletionprops.temperature

Home > @runlightyear/openai > CreateCompletionProps > temperature

CreateCompletionProps.temperature property

Defaults to 1 What sampling temperature to use. Higher values means the model will take more risks. Try 0.9 for more creative applications, and 0 (argmax sampling) for ones with a well-defined answer.

We generally recommend altering this or topP but not both.

Signature:
temperature?: number;