@ai2070/l0
Version:
L0: The Missing Reliability Substrate for AI
16 lines • 1.09 kB
TypeScript
import type { L0Event } from "../types/l0";
export declare function normalizeStreamEvent(chunk: any): L0Event;
export declare function normalizeError(error: Error | string | unknown): L0Event;
export declare function createTokenEvent(value: string): L0Event;
export declare function createMessageEvent(value: string, role: "user" | "assistant" | "system"): L0Event;
export declare function createCompleteEvent(): L0Event;
export declare function createErrorEvent(error: Error): L0Event;
export declare function normalizeStreamEvents(chunks: any[]): L0Event[];
export declare function filterEventsByType(events: L0Event[], type: L0Event["type"]): L0Event[];
export declare function extractTokens(events: L0Event[]): string[];
export declare function reconstructText(events: L0Event[]): string;
export declare function isErrorEvent(event: L0Event): boolean;
export declare function isCompleteEvent(event: L0Event): boolean;
export declare function isTokenEvent(event: L0Event): boolean;
export declare function getFirstError(events: L0Event[]): Error | null;
//# sourceMappingURL=events.d.ts.map