UNPKG

@thecodingwhale/cv-processor

Version:

CV Processor to extract structured data from PDF resumes using TypeScript

43 lines (42 loc) 1.42 kB
import { AIModelConfig, AIProvider, TokenUsageInfo } from '../types/AIProvider'; export interface AWSBedrockConfig extends Omit<AIModelConfig, 'apiKey'> { region?: string; accessKeyId?: string; secretAccessKey?: string; apiKey?: string; } export declare class AWSBedrockProvider implements AIProvider { private client; private config; constructor(config: AWSBedrockConfig); /** * Calculate estimated cost based on token usage and model */ private calculateCost; /** * Estimate token count based on text content */ private estimateTokenCount; /** * Extract all searchable terms from categories (names + keywords) */ private extractCategoryTerms; /** * Check if text contains any category-related terms (case-insensitive, substring matching) */ private textMatchesCategories; /** * Filter texts to only include those that match category terms */ private filterTextsByCategories; extractStructuredDataFromImages<T>(imageUrls: string[], dataSchema: object, instructions: string): Promise<T & { tokenUsage?: TokenUsageInfo; }>; extractStructuredDataFromText<T>(texts: string[], dataSchema: object, instructions: string, categories?: object[]): Promise<T & { tokenUsage?: TokenUsageInfo; }>; getModelInfo(): { provider: string; model: string; }; }