Nodes/ComfyUI-YogurtNodes/OpenAI Generate Text
ComfyUI Node

OpenAI Generate Text

Generate text using OpenAI API

By yogurt7771·Created 2 years ago·Updated 2 months ago· 0
OpenAI Generate Text
  • history
  • text
  • history
  • payload
api_key
base_url
model_namegpt-5.1
system_prompt
prompt
temperature1.00
top_p0.00
max_tokens4096
frequency_penalty0.00
presence_penalty0.00
retry_count1
chat_template<-system-> {{system_instruction}} <-/system-> <-user-> {{prompt}} <-/user->
proxy_url
timeout0
extra{}
CategoryYogurtNodes/LLM

Inputs (16)

NameTypeDefaultDescription
api_keySTRINGAPI key for accessing OpenAI API
base_urlSTRINGBase URL for OpenAI API (leave blank for official API)
model_nameSTRINGgpt-5.1OpenAI model name
system_promptSTRINGSystem-level prompt that affects the overall conversation style
promptSTRINGMain prompt content input by the user
temperatureFLOAT1.000–2Sampling temperature, higher values produce more random outputs
top_pFLOAT0.000–1Sampling probability threshold, controls output diversity
max_tokensINT40960–32768Maximum number of tokens in the generated text
frequency_penaltyFLOAT0.00-2–2Frequency penalty to reduce repetition
presence_penaltyFLOAT0.00-2–2Presence penalty to encourage new topics
retry_countINT11–10Number of retry attempts if the request fails
chat_templateSTRING<-system-> {{system_instruction}} <-/system-> <-user-> {{prompt}} <-/user->Content template for the generated text
proxy_urlSTRING代理URL,格式: protocol://user:pass@addr:port,支持http,https,socks5,socks5h
timeoutINT00–2147483647Timeout for the request in seconds, 0 means no timeout
historyoptHISTORY
extraoptSTRING{}Extra parameters for the request, in JSON format

Outputs (3)

NameTypeDescription
textSTRING
historyHISTORY
payload*