UNPKG

@callmedayz/ai-prompt-toolkit

Version:

Professional AI prompt engineering toolkit with advanced template features, real-time dashboards, conditional logic, template inheritance, live monitoring, OpenRouter integration, and 310+ model support

60 lines 1.93 kB
import { FewShotOptions, FewShotResult, FewShotExample } from './types'; /** * Few-Shot Learning Prompt Template System * Creates prompts with examples to guide AI model behavior through demonstration */ export declare class FewShotTemplate { private options; private template; constructor(options: FewShotOptions); /** * Generate the few-shot learning prompt */ generate(input: string): FewShotResult; /** * Add a new example */ addExample(example: FewShotExample): FewShotTemplate; /** * Remove an example by index */ removeExample(index: number): FewShotTemplate; /** * Update an example by index */ updateExample(index: number, example: FewShotExample): FewShotTemplate; /** * Get all examples */ getExamples(): FewShotExample[]; /** * Set maximum number of examples to include */ setMaxExamples(max: number): FewShotTemplate; /** * Create a template for common few-shot patterns */ static createPattern(pattern: 'classification' | 'extraction' | 'transformation' | 'qa' | 'generation', task: string): FewShotTemplate; /** * Create a balanced few-shot template with diverse examples */ static createBalanced(task: string, examples: FewShotExample[], options?: Partial<FewShotOptions>): FewShotTemplate; private static balanceExamples; private buildTemplate; } /** * Utility function to create a quick few-shot prompt */ export declare function createFewShot(task: string, examples: Array<{ input: string; output: string; explanation?: string; }>, input: string, options?: Partial<FewShotOptions>): FewShotResult; /** * Create few-shot examples from a dataset */ export declare function createExamplesFromData(data: Array<{ input: any; output: any; }>, maxExamples?: number): FewShotExample[]; //# sourceMappingURL=few-shot.d.ts.map