Nodes/comfyui-openai-api/OpenAI API - Options
ComfyUI Node

OpenAI API - Options

Sets the options for OpenAI API requests. Each numeric setting is sent only when its switch is on. Extra body parameters override the named settings.

By lany42·Created 9 days ago·Updated 2 days ago· 1
OpenAI API - Options
  • other_options
  • Options
◄use_seedfalse►
◄seed42►
◄use_temperaturefalse►
◄temperature1.0►
◄use_max_tokensfalse►
◄max_tokens512►
◄use_top_pfalse►
◄top_p1.00►
◄use_frequency_penaltyfalse►
◄frequency_penalty0.0►
◄use_presence_penaltyfalse►
◄presence_penalty0.0►
◄instructions_rolefalse►
◄extra_body►
CategoryOpenAI API

Inputs (15)

NameTypeDefaultDescription
use_seedBOOLEANfalseSend the seed for reproducible results. When off, the seed is not sent.
seedINT42Repeated requests with the same seed and parameters will return the same result
use_temperatureBOOLEANfalseSend the temperature, which controls the randomness of the generated text: lower values are more deterministic, higher values more varied. When off, the temperature is not sent.
temperatureFLOAT1.00–2Number between 0.0 and 2.0. Defaults to 1.0.
use_max_tokensBOOLEANfalseSend the maximum number of tokens that can be generated in the response. When off, the limit is not sent.
max_tokensINT5121–1000000An upper bound for the number of tokens that can be generated for a response
use_top_pBOOLEANfalseSend top P for nucleus sampling, an alternative to sampling with temperature where the model considers the tokens with top_p probability mass. When off, top P is not sent.
top_pFLOAT1.000–10.1 means only the tokens comprising the top 10% probability mass are considered
use_frequency_penaltyBOOLEANfalseSend the frequency penalty. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. When off, the penalty is not sent.
frequency_penaltyFLOAT0.0-2–2Number between -2.0 and 2.0
use_presence_penaltyBOOLEANfalseSend the presence penalty. 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. When off, the penalty is not sent.
presence_penaltyFLOAT0.0-2–2Number between -2.0 and 2.0
instructions_roleBOOLEANfalseSet this switch to true to set the instructions prompt role as 'developer' instead of 'system'. With o1 models and newer, OpenAI has changed the 'system' prompt role to 'developer'.
extra_bodySTRINGA JSON object of extra body parameters to include in the request, overriding the named settings. Leave empty to add none.
other_optionsoptOAIAPI_OPTIONSOthers options to merge with

Outputs (1)

NameTypeDescription
OptionsOAIAPI_OPTIONSMerged options to forward