Classes & Interfaces
FalStream
Properties
Properties
| Name | Type | Description |
|---|---|---|
config | RequiredConfig | - |
endpointId | string | - |
url | string | - |
options | StreamOptions<Input> | - |
listeners | Map<FalStreamEventType, EventHandler[]> | - |
buffer | Output[] | - |
currentData | Output | undefined | - |
lastEventTimestamp | any | - |
streamClosed | any | - |
_requestId | string | null | - |
donePromise | Promise<Output> | - |
abortController | any | - |
start | any | - |
handleResponse | any | - |
handleError | any | - |
on | any | - |
emit | any | - |
done | any | Gets a reference to the Promise that indicates whether the streaming is done or not. Developers should always call this in their apps to ensure the request is over. An alternative to this, is to use on('done') in case your application architecture works best with event listeners. |
abort | any | Aborts the streaming request. Note: This method is noop in case the request is already done. |
Methods
Methods
StreamingClient
Methods
Methods
stream
AsyncIterator or through an event listener.| Parameter | Type | Description |
|---|---|---|
endpointId | Id | the endpoint id, e.g. fal-ai/llavav15-13b. |
options | StreamOptions<InputType<Id>> | the request options, including the input payload. |
Promise<FalStream<InputType<Id>, OutputType<Id>>>Functions
createStreamingClient
| Parameter | Type | Description |
|---|---|---|
{ config, storage, } | StreamingClientDependencies | - |
StreamingClient