From 41679e2bd45f8219ce498f8f8e631f5d7292d7d9 Mon Sep 17 00:00:00 2001 From: Vedat Baday <54285744+badayvedat@users.noreply.github.com> Date: Tue, 18 Mar 2025 09:39:39 -0700 Subject: [PATCH] docs(client): improve run method documentation (#124) --- libs/client/src/client.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/libs/client/src/client.ts b/libs/client/src/client.ts index 3cfdfbb..d859412 100644 --- a/libs/client/src/client.ts +++ b/libs/client/src/client.ts @@ -40,10 +40,17 @@ export interface FalClient { 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. - * @returns the remote function output + * @param endpointId The endpoint id, e.g. `fal-ai/fast-sdxl`. + * @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( endpointId: Id,