@juspay/neurolink
Version:
The pipe layer of an AI nervous system: one interface connecting provider neurons to your application, across three inference types — generate, stream and decide. `decide` returns typed, calibrated judgements from a non-generative model (~400ms, ~$0.00002
22 lines (21 loc) • 796 B
TypeScript
import type { ErrorCode } from "../../types/index.js";
export declare class NeuroLinkFeatureError extends Error {
readonly code: ErrorCode;
readonly feature: string;
readonly retryable: boolean;
readonly details?: Record<string, unknown>;
readonly cause?: Error;
constructor(message: string, code: ErrorCode, feature: string, options?: {
retryable?: boolean;
details?: Record<string, unknown>;
cause?: Error;
});
}
export declare function createErrorFactory<TCodes extends Record<string, string>>(feature: string, codes: TCodes): {
codes: TCodes;
create: (code: keyof TCodes, message: string, options?: {
retryable?: boolean;
details?: Record<string, unknown>;
cause?: Error;
}) => NeuroLinkFeatureError;
};