Nodes/ComfyUI OpenAI API/OpenAI API - Chat Completion
ComfyUI Node

OpenAI API - Chat Completion

Generates text responses using OpenAI's chat completion API. Be sure to indicate a Vision Language Model if you are using an image input.

By hekmon·Created about a year ago·Updated 9 months ago· 42
OpenAI API - Chat Completion
  • client
  • history
  • options
  • images
  • Response
  • History
model
force_regenfalse
prompt
system_prompt
CategoryOpenAI API

Inputs (8)

NameTypeDefaultDescription
clientOAIAPI_CLIENTThe OpenAI API client to use to perform the request
modelSTRINGThe model to use for generating text
force_regenBOOLEANfalseSet to true to always request a new text generation even if no widget input values have changed (no cache)
promptSTRINGThe prompt to use for generating text
system_promptoptSTRINGThe system prompt to send along with the user prompt
historyoptOAIAPI_HISTORYPrevious conversation history
optionsoptOAIAPI_OPTIONSAdditional options to pass with the request
imagesoptIMAGEImage(s) to include in the request

Outputs (2)

NameTypeDescription
ResponseSTRINGGenerated text response
HistoryOAIAPI_HISTORYConversation history