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.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| use_seed | BOOLEAN | false | Send the seed for reproducible results. When off, the seed is not sent. |
| seed | INT | 42 | Repeated requests with the same seed and parameters will return the same result |
| use_temperature | BOOLEAN | false | Send 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. |
| temperature | FLOAT | 1.00–2 | Number between 0.0 and 2.0. Defaults to 1.0. |
| use_max_tokens | BOOLEAN | false | Send the maximum number of tokens that can be generated in the response. When off, the limit is not sent. |
| max_tokens | INT | 5121–1000000 | An upper bound for the number of tokens that can be generated for a response |
| use_top_p | BOOLEAN | false | Send 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_p | FLOAT | 1.000–1 | 0.1 means only the tokens comprising the top 10% probability mass are considered |
| use_frequency_penalty | BOOLEAN | false | Send 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_penalty | FLOAT | 0.0-2–2 | Number between -2.0 and 2.0 |
| use_presence_penalty | BOOLEAN | false | Send 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_penalty | FLOAT | 0.0-2–2 | Number between -2.0 and 2.0 |
| instructions_role | BOOLEAN | false | Set 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_body | STRING | A JSON object of extra body parameters to include in the request, overriding the named settings. Leave empty to add none. | |
| other_optionsopt | OAIAPI_OPTIONS | Others options to merge with |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| Options | OAIAPI_OPTIONS | Merged options to forward |