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.
OpenAI API - Chat Completion
- client
- history
- options
- images
- Response
- History
◄model—►
◄force_regenfalse►
◄prompt—►
◄system_prompt—►
CategoryOpenAI API
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| client | OAIAPI_CLIENT | The OpenAI API client to use to perform the request | |
| model | STRING | The model to use for generating text | |
| force_regen | BOOLEAN | false | Set to true to always request a new text generation even if no widget input values have changed (no cache) |
| prompt | STRING | The prompt to use for generating text | |
| system_promptopt | STRING | The system prompt to send along with the user prompt | |
| historyopt | OAIAPI_HISTORY | Previous conversation history | |
| optionsopt | OAIAPI_OPTIONS | Additional options to pass with the request | |
| imagesopt | IMAGE | Image(s) to include in the request |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Response | STRING | Generated text response |
| History | OAIAPI_HISTORY | Conversation history |