/** * Factory function to create a new LLM tracker. * The tracker is designed to be created once and reused for multiple customers. */ export declare function createLLMTracker(config: { apiKey: string; environment?: 'test_mode' | 'live_mode'; eventName: string; }): { /** * Wrap an LLM client to automatically track token usage * * @param args.client - The LLM client to wrap (OpenAI, Anthropic, Groq, etc.) * @param args.customerId - Unique customer identifier for billing * @param args.metadata - Additional metadata to attach to tracking events * @returns Wrapped client that automatically tracks usage * * @example * ```typescript * const wrappedClient = tracker.wrap({ * client: openai, * customerId: 'cus_user123', * metadata: { feature: 'chat' } * }); * const response = await wrappedClient.chat.completions.create({...}); * ``` */ wrap(args: { client: T; customerId: string; metadata?: Record; }): T; /** * Manual tracking for existing responses * @param response - The usage object to track * @param customerId - The customer ID to track the usage for * @param metadata - Additional metadata to attach to tracking events */ track(response: any, customerId: string, metadata?: Record): Promise; /** * Health check * @returns True if the tracker is healthy, false otherwise */ healthCheck(): Promise; }; //# sourceMappingURL=factory.d.ts.map