openai.ChatClient$stream

One model turn against OpenAI's Chat Completions API (`POST https://api.openai.com/v1/chat/completions`).

Reference version

Signature

class openai.ChatClient$stream

One model turn against OpenAI's Chat Completions API (POST https://api.openai.com/v1/chat/completions).

The sibling of openai.ResponsesClient: same provider, older and far more widely-cloned endpoint. Reach for this one when you want chat-completions semantics from OpenAI itself; for any other OpenAI-compatible server use openai.GenericClient, openai.OllamaClient, openai.OpenRouterClient or openai.AzureClient, which are the same wire core with different compat flags (openai/ns_internal/chat.baml).

Source:<builtin>/openai/chat.bamlbytes 0–0

Fields

model

string | null

api_key

ai.Credential$stream | null

base_url

ai.Credential$stream | null

request_timeout_ms

int | null

time_to_first_token_timeout_ms

int | null

request_body

baml.json.json$stream | null

headers

map<string, string> | null

query_params

map<string, string> | null

temperature

float | null

max_tokens

int | null

max_completion_tokens

int | null

top_p

float | null

stop

string[] | null

seed

int | null

capture_wire

bool | null