UNPKG

@aivue/image-caption

Version:

AI-powered image captioning for Vue.js applications using Hugging Face BLIP models

35 lines (34 loc) 1.32 kB
import type { ImageCaptionConfig, ImageCaptionOptions, ImageCaptionResult, ImageUploadEvent, BatchCaptionRequest, BatchCaptionResult } from '../types'; export declare const AVAILABLE_MODELS: { id: string; name: string; description: string; provider: string; maxTokens: number; costPer1000Tokens: number; }[]; export interface UseImageCaptionOptions { config?: Partial<ImageCaptionConfig>; autoCaption?: boolean; saveHistory?: boolean; maxHistorySize?: number; } export interface UseImageCaptionReturn { isLoading: any; isProcessing: any; error: any; result: any; history: any; currentImage: any; generateCaption: (image: File | string, options?: ImageCaptionOptions) => Promise<ImageCaptionResult>; generateBatchCaptions: (request: BatchCaptionRequest) => Promise<BatchCaptionResult>; uploadImage: (file: File) => Promise<ImageUploadEvent>; processImageUrl: (url: string) => Promise<string>; clearHistory: () => void; clearError: () => void; clearResult: () => void; setConfig: (config: Partial<ImageCaptionConfig>) => void; getModelInfo: (modelId: string) => any; exportHistory: (format: 'json' | 'csv') => string; } export declare function useImageCaption(options?: UseImageCaptionOptions): UseImageCaptionReturn;