Namespace: api
Functions
retryNever
▸ retryNever(): <OUTPUT>(f
: () => PromiseLike
<OUTPUT
>) => Promise
<OUTPUT
>
The retryNever
strategy never retries a failed API call.
Returns
fn
▸ <OUTPUT
>(f
): Promise
<OUTPUT
>
Type parameters
Name |
---|
OUTPUT |
Parameters
Name | Type |
---|---|
f | () => PromiseLike <OUTPUT > |
Returns
Promise
<OUTPUT
>
Defined in
packages/modelfusion/src/core/api/retryNever.ts:5
retryWithExponentialBackoff
▸ retryWithExponentialBackoff(«destructured»?
): RetryFunction
The retryWithExponentialBackoff
strategy retries a failed API call with an exponential backoff.
You can configure the maximum number of tries, the initial delay, and the backoff factor.
Parameters
Name | Type | Default value |
---|---|---|
«destructured» | Object | {} |
› backoffFactor | undefined | number | 2 |
› initialDelayInMs | undefined | number | 2000 |
› maxTries | undefined | number | 3 |
Returns
Defined in
packages/modelfusion/src/core/api/retryWithExponentialBackoff.ts:12
throttleMaxConcurrency
▸ throttleMaxConcurrency(«destructured»
): ThrottleFunction
The throttleMaxConcurrency
strategy limits the number of parallel API calls.
Parameters
Name | Type |
---|---|
«destructured» | Object |
› maxConcurrentCalls | number |
Returns
Defined in
packages/modelfusion/src/core/api/throttleMaxConcurrency.ts:48
throttleOff
▸ throttleOff(): ThrottleFunction
The throttleOff
strategy does not limit parallel API calls.