v2026.6.4
All Bundles
Bundle OpenAI API client. Supports Chat Completions (GPT-4o, o1, etc.), Embeddings, Image Generation (DALL-E), and function/tool calling. Set OPENAI_API_KEY environment variable before use. Compile with -lib openai.

Realtime

Realtime API support

Operations

Respond # function

Query with text input and respond with text and audio outputs

function : Respond(audio:Byte[], model:String, token:String) ~ Pair<String,ByteArrayRef>

Parameters

NameTypeDescription
audioByteaudio byte stream
modelStringmodel name
tokenStringAPI token

Return

TypeDescription
Pair<String,ByteArrayRef>pair with text and binary audio outputs

Respond # function

Query with text input and respond with text and audio outputs

function : Respond(audio:Byte[], model:String, voice:String, token:String) ~ Pair<String,ByteArrayRef>

Parameters

NameTypeDescription
audioByteaudio byte stream
modelStringmodel name
voiceStringvoice use when generating the audio
tokenStringAPI token

Return

TypeDescription
Pair<String,ByteArrayRef>pair with text and binary audio outputs

Respond # function

Query with text input and respond with text and audio outputs

function : Respond(text:String, model:String, token:String) ~ Pair<String,ByteArrayRef>

Parameters

NameTypeDescription
textStringtext query
modelStringmodel name
tokenStringAPI token

Return

TypeDescription
Pair<String,ByteArrayRef>pair with text and binary audio outputs

Respond # function

Query with text input and respond with text and audio outputs

function : Respond(text:String, model:String, voice:String, token:String) ~ Pair<String,ByteArrayRef>

Parameters

NameTypeDescription
textStringtext query
modelStringmodel name
voiceStringvoice use when generating the audio
tokenStringAPI token

Return

TypeDescription
Pair<String,ByteArrayRef>pair with text and binary audio outputs