Interface StreamingClient

The streaming client interface.

interface StreamingClient {
    stream<Id>(endpointId: Id, options: StreamOptions<InputType<Id>>): Promise<FalStream<InputType<Id>, OutputType<Id>>>;
}

Methods

Methods

  • Calls a fal app that supports streaming and provides a streaming-capable object as a result, that can be used to get partial results through either AsyncIterator or through an event listener.

    Type Parameters

    • Id extends EndpointType

    Parameters

    • endpointId: Id

      the endpoint id, e.g. fal-ai/llavav15-13b.

    • options: StreamOptions<InputType<Id>>

      the request options, including the input payload.

    Returns Promise<FalStream<InputType<Id>, OutputType<Id>>>

    the FalStream instance.