UNPKG

venice-ai-sdk-apl

Version:

A comprehensive SDK for the Venice AI API with CLI support, programmatic CLI usage, CLI-style interface, and interactive demo

42 lines (41 loc) 1.02 kB
/** * Rate Limit Error class * * This class represents rate limit errors returned by the Venice AI API. * It includes information about the rate limit such as the limit, remaining, * and reset time. */ import { ApiError, ApiErrorOptions } from './api-error'; import { RateLimitInfo } from '../types/common'; /** * Rate Limit Error options */ export interface RateLimitErrorOptions extends ApiErrorOptions { /** * Rate limit information */ rateLimitInfo?: RateLimitInfo; } /** * Rate Limit Error class */ export declare class RateLimitError extends ApiError { /** * Rate limit information */ rateLimitInfo?: RateLimitInfo; /** * Creates a new rate limit error * * @param options - Error options */ constructor(options: RateLimitErrorOptions); /** * Returns a string representation of the error */ toString(): string; /** * Returns the time in milliseconds until the rate limit resets */ getRetryAfterMs(): number; }