Skip to content

AxRateLimiterTokenUsage

Class: AxRateLimiterTokenUsage

Constructors

new AxRateLimiterTokenUsage()

new AxRateLimiterTokenUsage(maxTokens, refillRate, options?): AxRateLimiterTokenUsage

Parameters

maxTokens: number

refillRate: number

options?: Readonly<AxRateLimiterTokenUsageOptions>

Returns

AxRateLimiterTokenUsage

Defined in

src/ax/util/rate-limit.ts:16

Methods

acquire()

acquire(tokens): Promise<void>

Parameters

tokens: number

Returns

Promise<void>

Defined in

src/ax/util/rate-limit.ts:56