docs(client): improve run method documentation (#124)

This commit is contained in:
Vedat Baday 2025-03-18 09:39:39 -07:00 committed by GitHub
parent 2f8f702bbe
commit 41679e2bd4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,10 +40,17 @@ export interface FalClient {
readonly streaming: StreamingClient; readonly streaming: StreamingClient;
/** /**
* Runs a fal endpoints identified by its `endpointId`. * Runs a fal endpoint identified by its `endpointId`.
* *
* @param endpointId the registered function revision id or alias. * @param endpointId The endpoint id, e.g. `fal-ai/fast-sdxl`.
* @returns the remote function output * @param options The request options, including the input payload.
* @returns A promise that resolves to the result of the request once it's completed.
*
* @note
* We **do not recommend** this use for most use cases as it will block the client
* until the response is received. Moreover, if the connection is closed before
* the response is received, the request will be lost. Instead, we recommend
* using the `subscribe` method for most use cases.
*/ */
run<Id extends EndpointType>( run<Id extends EndpointType>(
endpointId: Id, endpointId: Id,