UNPKG

@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

48 lines (47 loc) • 1.68 kB
/** * PPT Content Planner * * Generates structured slide content plan using AI. * Takes a topic and configuration, returns a detailed ContentPlan JSON. * * Follows the video handler pattern (vertexVideoHandler.ts): * - Standalone module with clear responsibility * - Uses AI provider for generation * - Returns structured result * * @module presentation/contentPlanner */ import type { AIProvider, ContentPlan, PPTGenerationContext } from "../../types/index.js"; /** * Generate a content plan for the presentation * * This is the main entry point for content planning. It: * 1. Builds the AI prompt with all configuration * 2. Calls the AI provider to generate the plan * 3. Parses and validates the response * 4. Returns a structured ContentPlan * * @param context - PPT generation context (extracted from GenerateOptions) * @param provider - AI provider instance (already validated) * @returns Promise<ContentPlan> - Structured slide plan * * @example * ```typescript * const context = extractPPTContext(options); * const plan = await generateContentPlan(context, provider); * console.log(`Generated ${plan.totalSlides} slides`); * ``` */ export declare function generateContentPlan(context: PPTGenerationContext, provider: AIProvider): Promise<ContentPlan>; /** * Ensure first slide is title type */ export declare function ensureTitleSlide(plan: ContentPlan): ContentPlan; /** * Ensure last slide is thank-you type */ export declare function ensureThankYouSlide(plan: ContentPlan): ContentPlan; /** * Apply post-processing to ensure plan follows best practices */ export declare function postProcessPlan(plan: ContentPlan): ContentPlan;