Realtime WebSocket sessions and REST helpers.
The WebSocket codec is pure. connect adds a thin OkHttp transport and exposes both callbacks and a blocking queue through take! and poll!.
Realtime WebSocket sessions and REST helpers. The WebSocket codec is pure. connect adds a thin OkHttp transport and exposes both callbacks and a blocking queue through take! and poll!.
(accept-call client call-id session)Accept a SIP call using a Realtime session configuration.
Accept a SIP call using a Realtime session configuration.
(close! connection)Close a Realtime connection.
Close a Realtime connection.
(connect {:keys [api-key client-secret okhttp-client queue-capacity on-event
on-open on-close on-error]
:as opts})Open a Realtime WebSocket and return a RealtimeConnection.
Open a Realtime WebSocket and return a RealtimeConnection.
(create-client-secret client req)Create a short-lived Realtime or transcription client secret.
Create a short-lived Realtime or transcription client secret.
(create-session client req)Create a legacy beta Realtime session and return a normalized map.
Create a legacy beta Realtime session and return a normalized map.
(create-transcription-session client req)Create a legacy beta Realtime transcription session.
Create a legacy beta Realtime transcription session.
(create-translation-session {:keys [api-key base-url okhttp-client]} req)Create a short-lived Realtime Translation client secret.
Takes transport config because openai-java 4.42.0 has translation models but does not expose the translation REST service.
Create a short-lived Realtime Translation client secret. Takes transport config because openai-java 4.42.0 has translation models but does not expose the translation REST service.
(decode-server-event wire-json)Decode Realtime wire JSON to a normalized Clojure map.
Decode Realtime wire JSON to a normalized Clojure map.
(encode-client-event event)Encode a Clojure client-event map as Realtime wire JSON.
Encode a Clojure client-event map as Realtime wire JSON.
(poll! connection)(poll! connection timeout-ms)Return the next event immediately, or wait up to timeout-ms.
Return the next event immediately, or wait up to timeout-ms.
(send! connection event)Encode and send a client event.
Encode and send a client event.
(take! connection)Block until the next normalized server event is available.
Block until the next normalized server event is available.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |