UNPKG

jorel

Version:

A unified wrapper for working with LLMs from multiple providers, including streams, images, documents & automatic tool use.

27 lines (26 loc) 811 B
/** * Error thrown when a generation request is cancelled via AbortSignal */ export declare class JorElAbortError extends Error { readonly name = "AbortError"; readonly code = "GENERATION_ABORTED"; readonly isAbortError = true; constructor(message?: string); } /** * Error thrown when an LLM provider encounters an error */ export declare class JorElLlmError extends Error { readonly type: string; readonly name = "LlmError"; readonly code = "LLM_ERROR"; constructor(message: string, type: string); } /** * Type guard to check if an error is an AbortError */ export declare function isAbortError(error: unknown): error is JorElAbortError; /** * Type guard to check if an error is an LlmError */ export declare function isLlmError(error: unknown): error is JorElLlmError;