Skip to main content

openai.createchatcompletionprops.temperature

Home > @runlightyear/openai > CreateChatCompletionProps > temperature

CreateChatCompletionProps.temperature property

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

We generally recommend altering this or top_p but not both.

Defaults to 1

Signature:
temperature?: number;