Mojentic.Realtime.Gateway behaviour (Mojentic v1.5.0)

Copy Markdown View Source

Behaviour for realtime voice gateways.

Sibling to Mojentic.LLM.Gateway: the chat-completions gateway is request/response; this one opens a duplex session and yields a stream of normalised events.

Summary

Callbacks

Open a realtime session. Returns the transport pid on success; callers subscribe to it via Transport.subscribe/2 for inbound events.

Callbacks

open(model, config, correlation_id)

@callback open(
  model :: String.t(),
  config :: Mojentic.Realtime.Config.t(),
  correlation_id :: String.t() | nil
) :: {:ok, pid()} | {:error, term()}

Open a realtime session. Returns the transport pid on success; callers subscribe to it via Transport.subscribe/2 for inbound events.