@aidalinfo/pdf-processor
Version:
Powerful PDF data extraction library powered by AI vision models. Transform PDFs into structured, validated data using TypeScript, Zod, and AI providers like Scaleway and Ollama.
30 lines (29 loc) • 731 B
TypeScript
/**
* Interface pour les requêtes API Vision
*/
export interface VisionExtractRequest {
provider?: 'scaleway' | 'ollama' | 'mistral' | 'custom';
model?: string;
query?: string;
cropSize?: number;
tablesOnly?: boolean;
documentType?: 'invoice' | 'receipt' | 'basic' | 'custom';
enhanceContrast?: boolean;
targetQuality?: number;
debug?: boolean;
}
/**
* Valide les paramètres d'une requête d'extraction
*/
export declare function validateExtractRequest(body: any): {
valid: boolean;
error?: string;
data?: VisionExtractRequest;
};
/**
* Valide qu'un fichier est bien un PDF
*/
export declare function validatePdfFile(file: File): {
valid: boolean;
error?: string;
};