Skip to main content
OpenAI is an LLM plugin. It takes the transcribed conversation and generates the reply using OpenAI’s chat models, with tool calling and an optional low-latency WebSocket streaming mode.

Setup

Set your OpenAI API key in the worker environment. Generate a key from the OpenAI dashboard:

Usage

Import the plugin and pass it to the pipeline’s llm slot.
The default model is gpt-5.4-nano in the Python SDK and gpt-4o in the JavaScript and Go SDKs. Pass model explicitly to avoid surprises across SDKs.

Low-latency streaming

Set streaming=True (Python) to use OpenAI’s WebSocket Responses API instead of HTTP chat completions. The connection is reused across turns and continues with previous_response_id for lower per-turn latency.
Python

Azure OpenAI

To run OpenAI chat models through Azure OpenAI, use the separate AzureOpenAILLM plugin. It reads its configuration from Azure environment variables when arguments are omitted:
Python
deployment is the custom name you chose when deploying a model in Azure (not the underlying model name). Authenticate with api_key, or fall back to the AZURE_OPENAI_API_KEY environment variable.

Configuration Options

Constructor parameters for the Python SDK (OpenAILLM). The JavaScript and Go SDKs expose model, temperature, and max_output_tokens/maxOutputTokens plus common sampling options in their idiomatic form (camelCase / LLMOptions struct).

Core

Sampling

Reasoning models

Streaming & client

Import paths

Azure OpenAI is provided by the separate AzureOpenAILLM plugin (from zrt.plugins import AzureOpenAILLM), currently available in the Python SDK only.
The reply is streamed to the text-to-speech plugin, which synthesizes the agent’s voice.