FalEx.Realtime (fal_ex v0.1.0)
View SourceRealtime client for WebSocket connections to fal.ai.
Provides bidirectional communication with AI models that support real-time interaction.
Summary
Functions
Closes a realtime connection.
Connects to a realtime endpoint.
Creates a new realtime client.
Sends a message through the realtime connection.
Types
@type t() :: %FalEx.Realtime{config: FalEx.Config.t()}
Functions
Closes a realtime connection.
Connects to a realtime endpoint.
Options
:connection_key
- Reuse existing connection with this key:throttle_interval
- Throttle messages (ms, default: 128):on_message
- Callback for incoming messages:on_error
- Callback for errors:on_close
- Callback for connection close
Examples
{:ok, conn} = Realtime.connect(realtime, "fal-ai/llava-next",
on_message: fn message ->
IO.inspect(message)
end
)
Creates a new realtime client.
Sends a message through the realtime connection.