FalEx.Streaming (fal_ex v0.1.0)
View SourceStreaming client for handling Server-Sent Events (SSE) from fal.ai.
Provides real-time streaming of model outputs with support for partial results.
Summary
Functions
Closes a stream.
Creates a new streaming client.
Gets the next chunk from a stream.
Starts a streaming request to a fal endpoint.
Types
@type t() :: %FalEx.Streaming{config: FalEx.Config.t()}
Functions
Closes a stream.
Creates a new streaming client.
Gets the next chunk from a stream.
Returns:
{:ok, data, stream}
- Data chunk received{:done, stream}
- Stream completed{:error, reason}
- Error occurred
Starts a streaming request to a fal endpoint.
Returns a stream handle that can be used to receive data chunks.
Options
:input
- Input payload for the model:method
- HTTP method (default: :post):timeout
- Stream timeout in ms (default: 15000)