@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio
52 lines (51 loc) • 1.86 kB
TypeScript
/**
* Provider Image Adapter - Smart routing for multimodal content
* Handles provider-specific image formatting and vision capability validation
*/
import type { Content, ImageWithAltText } from "../types/index.js";
/**
* Simplified logger for essential error reporting only
*/
export declare class MultimodalLogger {
static logError(step: string, error: Error, context: unknown): void;
}
/**
* Provider Image Adapter - Smart routing and formatting
*/
export declare class ProviderImageAdapter {
/**
* Validate image count against provider limits.
* Warns at 80% threshold, throws error if limit exceeded.
*/
static validateImageCount(imageCount: number, provider: string, model?: string): void;
/**
* Convert simple images array to advanced content format
* @param text - Text content to include
* @param images - Array of images (Buffer, string, or ImageWithAltText)
*/
static convertToContent(text: string, images?: Array<Buffer | string | ImageWithAltText>): Content[];
/**
* Check if provider supports multimodal content
*/
static supportsVision(provider: string, model?: string): boolean;
/**
* Get supported models for a provider
*/
static getSupportedModels(provider: string): string[];
/**
* Get all vision-capable providers
*/
static getVisionProviders(): string[];
/**
* Count total "images" in a message (actual images + PDF pages)
* PDF pages count toward image limits for providers
*/
static countImagesInMessage(images: Array<Buffer | string>, pdfPages?: number | null): number;
/**
* Extract page count from PDF metadata array
* Returns total pages across all PDFs
*/
static countImagesInPages(pdfMetadataArray: Array<{
pageCount?: number | null;
}> | undefined): number;
}