younifyd
Menu

Stream Chat Completion

Stream chat completions using OpenAI's ChatGPT API with the AI SDK

Use it in a workflow

  1. Add a step and choose the ChatGPT connector.
  2. Pick the Stream Chat Completion action (under openai).
  3. Fill in the fields below, then reference the result from later steps as {{streamChatCompletion.response.data}}.

Fields

modelstringrequired

Model ID to use (e.g., gpt-5, gpt-5-mini)

messagesstringrequired

JSON array of messages (e.g., [{"role":"user","content":"Hello!"}])

temperaturenumber

Controls randomness (0-1, default: 1)

Default 1

topPnumber

Nucleus sampling (0-1, default: 1)

Default 1

maxTokensnumber

Maximum tokens to generate

stopstring

JSON array of stop sequences (e.g., ["\n", "END"])

presencePenaltynumber

Penalty for new topics (-2.0 to 2.0, default: 0)

Default 0

frequencyPenaltynumber

Penalty for repetition (-2.0 to 2.0, default: 0)

Default 0

userstring

Unique identifier for the end-user

streamFormatstring

Stream format: "text" uses toTextStreamResponse() (simple text chunks), "data" uses toUIMessageStreamResponse() (structured data stream), "iterable" returns iterable chunks (default)

One oftextdataiterableDefault "iterable"

Need more? See the ChatGPT guide for connection setup and behaviour shared by every action.

Was this page helpful?