FalClient

interface FalClient

The main client class that provides access to simple API model usage, as well as access to the queue APIs.

See also

AsyncFalClient

Properties

Link copied to clipboard
abstract val queue: QueueClient

The queue client with specific methods to interact with the queue API.

Functions

Link copied to clipboard
abstract suspend fun <Output : Any> run(endpointId: String, input: Any, resultType: KClass<Output>, options: RunOptions = RunOptions()): RequestOutput<Output>

Sends a request to the given endpointId. This method is a direct request to the model API and it waits for the processing to complete before returning the result.

Link copied to clipboard
inline suspend fun <Output : Any> FalClient.run(endpointId: String, input: Any, options: RunOptions = RunOptions()): RequestOutput<Output>
Link copied to clipboard
abstract suspend fun <Output : Any> subscribe(endpointId: String, input: Any, resultType: KClass<Output>, options: SubscribeOptions = SubscribeOptions(), onQueueUpdate: OnStatusUpdate? = null): RequestOutput<Output>

Submits a request to the given endpointId. This method uses the queue API to submit the request and poll for the result.

Link copied to clipboard
inline suspend fun <Output : Any> FalClient.subscribe(endpointId: String, input: Any, options: SubscribeOptions = SubscribeOptions(), noinline onUpdate: OnStatusUpdate? = null): RequestOutput<Output>