call-ai
Version:
Lightweight library for making AI API calls with streaming support
15 lines (14 loc) • 552 B
TypeScript
import { Mocks } from "./types.js";
declare function handleApiError(ierror: unknown, context: string, debug?: boolean, options?: {
apiKey?: string;
endpoint?: string;
skipRefresh?: boolean;
refreshToken?: string;
updateRefreshToken?: (currentToken: string) => Promise<string>;
mock?: Mocks;
}): Promise<void>;
declare function checkForInvalidModelError(response: Response, model: string, debug?: boolean): Promise<{
isInvalidModel: boolean;
errorData?: unknown;
}>;
export { handleApiError, checkForInvalidModelError };