/** * Gemini Provider Implementation * * Implements the LLMProvider interface for Google's Gemini API. * Handles all Gemini-specific logic including API calls, configuration, and capabilities. */ import type { LLMProvider, LLMCapabilities, ServiceType } from '../types.js'; import type { TextTextParams, ImageTextParams, TextImageParams, ImageImageParams, DocumentTextParams, LLMResponse, Logger, GeminiGenerationConfig } from '../../llm_api/types.js'; /** * Configuration for Gemini provider */ export interface GeminiProviderConfig { /** API key from .env.local (GEMINI_API_KEY) */ api_key: string; /** Base API URL for text generation */ api_url?: string; /** API URL for image generation (optional) */ api_url_image?: string; /** Model for text_text service (e.g., gemini-2.5-flash) */ model_text_text?: string; /** Model for image_text service */ model_image_text?: string; /** Model for text_image service */ model_text_image?: string; /** Model for image_image service */ model_image_image?: string; /** Model for document_text service (PDF analysis) */ model_document_text?: string; /** Generation config for text API calls */ text_config?: GeminiGenerationConfig; /** Generation config for image API calls */ image_config?: GeminiGenerationConfig; /** Capabilities this provider supports */ capabilities?: ServiceType[]; /** Logger instance */ logger: Logger; } /** * Gemini LLM Provider * Implements the LLMProvider interface for Google Gemini API */ export declare class GeminiProvider implements LLMProvider { private readonly name; private readonly api_key; private readonly api_url; private readonly api_url_image; private readonly model_text_text; private readonly model_image_text; private readonly model_text_image; private readonly model_image_image; private readonly model_document_text; private readonly text_config; private readonly image_config; private readonly capabilities; private readonly logger; /** * Create a new Gemini provider instance * @param config - Gemini provider configuration */ constructor(config: GeminiProviderConfig); /** * Get the provider name * @returns Provider name */ get_name(): string; /** * Get the capabilities this provider supports * @returns Set of supported service types */ get_capabilities(): LLMCapabilities; /** * Get the model name configured for a specific service type * @param service_type - The service type to get the model for * @returns Model name or undefined if not configured */ get_model_for_service(service_type: ServiceType): string | undefined; /** * Text input → Text output * Generate text from a text prompt * * @param params - Text input parameters * @param logger - Logger instance * @returns LLM response with generated text */ text_text(params: TextTextParams, logger: Logger): Promise; /** * Image input → Text output * Analyze an image and generate text description * * @param params - Image input parameters * @param logger - Logger instance * @returns LLM response with generated text */ image_text(params: ImageTextParams, logger: Logger): Promise; /** * Text input → Image output * Generate an image from a text prompt * * @param params - Text input parameters for image generation * @param logger - Logger instance * @returns LLM response with generated image */ text_image(params: TextImageParams, logger: Logger): Promise; /** * Image input → Image output * Transform/edit an image based on instructions * * @param params - Image input parameters with transformation instructions * @param logger - Logger instance * @returns LLM response with transformed image */ image_image(params: ImageImageParams, logger: Logger): Promise; /** * Document input → Text output * Analyze a document (PDF) and generate text description * * Gemini supports PDF natively via the same multimodal format as images. * PDFs are passed as inline_data with application/pdf MIME type. * * @param params - Document input parameters * @param logger - Logger instance * @returns LLM response with generated text */ document_text(params: DocumentTextParams, logger: Logger): Promise; } //# sourceMappingURL=gemini_provider.d.ts.map