Skip to documentation
Open Workflow Studio
On this page

Chat Completions

Workflow reference | Model configuration

Kind: ChatCompletions
Configuration object: model

Use this step when a provider exposes a Chat Completions-compatible endpoint and the request is organized as messages.

Inputs

The same input bindings, prompt templates, and request rendering described for Model apply. Use placeholders in message content to control input placement. Without placeholders, a nonempty rendered input is appended as a user message.

Configuration

All Model configuration properties apply. This kind forces the effective protocol to ChatCompletions at invocation. Keep the saved protocol consistent with that kind and configure a Chat Completions endpoint.

Use messages as the provider input. A request that also supplies Responses-style input is rejected. Authentication must match the chosen endpoint.

Outputs

Returns the complete extracted assistant response, with supported streaming deltas and usage visible separately. A JSON response becomes typed downstream input. For bounded conversational refinement or tool handoffs, use this step as the model child of Multi-turn.

Example

{
  "id": "chat",
  "name": "Answer with Chat Completions",
  "kind": "ChatCompletions",
  "model": {
    "playground": "openai",
    "model": "my-chat-deployment",
    "protocol": "ChatCompletions",
    "endpoint": "https://example.openai.azure.com/openai/v1/chat/completions",
    "credentialName": "MODEL_API_KEY",
    "authenticationHeader": "api-key",
    "requestBody": "{\"model\":\"my-chat-deployment\",\"messages\":[{\"role\":\"user\",\"content\":\"{{input}}\"}],\"stream\":true}"
  }
}

Replace the sample deployment and endpoint, then supply the runtime credential. Add system messages and supported provider controls through the captured playground settings.

An unhandled error has occurred. Reload 🗙