UNPKG

@ai2070/l0

Version:

L0: The Missing Reliability Substrate for AI

21 lines 1.12 kB
export interface MemoryEntry { role: "user" | "assistant" | "system"; content: string; timestamp?: number; metadata?: Record<string, any>; } export interface FormatMemoryOptions { maxEntries?: number; includeTimestamps?: boolean; includeMetadata?: boolean; style?: "conversational" | "structured" | "compact"; normalize?: boolean; } export declare function formatMemory(memory: MemoryEntry[] | string, options?: FormatMemoryOptions): string; export declare function createMemoryEntry(role: "user" | "assistant" | "system", content: string, metadata?: Record<string, any>): MemoryEntry; export declare function mergeMemory(...memories: MemoryEntry[][]): MemoryEntry[]; export declare function filterMemoryByRole(memory: MemoryEntry[], role: "user" | "assistant" | "system"): MemoryEntry[]; export declare function getLastNEntries(memory: MemoryEntry[], n: number): MemoryEntry[]; export declare function calculateMemorySize(memory: MemoryEntry[]): number; export declare function truncateMemory(memory: MemoryEntry[], maxSize: number): MemoryEntry[]; //# sourceMappingURL=memory.d.ts.map