/** * Analyze the sentiment of text using AI. */ export declare function analyzeSentiment(text: string, options?: { provider?: 'anthropic' | 'openai' | 'ollama' model?: string aspects?: string[] }): Promise; /** * Classify text into one of the provided labels. */ export declare function classifyText(text: string, labels: string[], options?: { provider?: 'anthropic' | 'openai' | 'ollama' model?: string multiLabel?: boolean }): Promise; /** * Generate an intelligent summary of text. * * Not exported as a bare top-level identifier because `text.ts` already * exposes `summarize`, and `index.ts` re-exports both via `export *`. * Reach this multi-provider variant through the `personalization` * namespace export below: `personalization.summarize(...)`. */ declare function summarize(text: string, options?: SummaryOptions): Promise; /** * Generate personalized content recommendations based on user profile and available items. */ export declare function recommend(profile: UserProfile, items: ContentItem[], options?: RecommendationOptions): Promise; /** * Create a new empty user profile. */ export declare function createProfile(id: string, segments?: string[]): UserProfile; /** * Record a user interaction and update preferences. */ export declare function recordInteraction(profile: UserProfile, interaction: Interaction): UserProfile; /** * Extract keywords/topics from user interactions using AI. */ export declare function extractUserInterests(profile: UserProfile, items: ContentItem[], options?: { provider?: 'anthropic' | 'openai' | 'ollama'; model?: string }): Promise; // ============================================================================ // Exports // ============================================================================ export declare const personalization: { analyzeSentiment: typeof analyzeSentiment; classifyText: typeof classifyText; summarize: typeof summarize; recommend: typeof recommend; createProfile: typeof createProfile; recordInteraction: typeof recordInteraction; extractUserInterests: typeof extractUserInterests }; // ============================================================================ // Types // ============================================================================ export declare interface UserProfile { id: string preferences: Record interactions: Interaction[] segments: string[] metadata?: Record } export declare interface Interaction { type: 'view' | 'click' | 'purchase' | 'like' | 'dislike' | 'share' | 'bookmark' | 'custom' itemId: string timestamp: number weight?: number metadata?: Record } export declare interface ContentItem { id: string content: string category?: string tags?: string[] metadata?: Record } export declare interface RecommendationOptions { provider?: 'anthropic' | 'openai' | 'ollama' model?: string maxTokens?: number temperature?: number limit?: number } export declare interface RecommendationResult { recommendations: Array<{ itemId: string score: number reason: string }> model: string provider: string } export declare interface SentimentResult { sentiment: 'positive' | 'negative' | 'neutral' | 'mixed' score: number confidence: number aspects?: Array<{ aspect: string sentiment: 'positive' | 'negative' | 'neutral' score: number }> } export declare interface ClassificationResult { label: string confidence: number allLabels: Array<{ label: string confidence: number }> } export declare interface SummaryOptions { provider?: 'anthropic' | 'openai' | 'ollama' model?: string maxLength?: number style?: 'concise' | 'detailed' | 'bullet-points' language?: string }