Interface StreamingClient

The streaming client interface.

interface StreamingClient {
    stream<Output, Input>(endpointId: string, options: StreamOptions<Input>): Promise<FalStream<Input, Output>>;
}

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

    • Output = any
    • Input = Record<string, any>

    Parameters

    • endpointId: string

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

    • options: StreamOptions<Input>

      the request options, including the input payload.

    Returns Promise<FalStream<Input, Output>>

    the FalStream instance.