/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { CountTokensResponse, GenerateContentResponse, type GenerateContentParameters, type CountTokensParameters, EmbedContentResponse, type EmbedContentParameters } from '@google/genai'; import { Config } from '../config/config.js'; import type { IProviderManager as ProviderManager } from '../providers/IProviderManager.js'; import { UserTierId } from '../code_assist/types.js'; /** * Interface abstracting the core functionalities for generating content and counting tokens. */ export interface ContentGenerator { generateContent(request: GenerateContentParameters, userPromptId: string): Promise; generateContentStream(request: GenerateContentParameters, userPromptId: string): Promise>; countTokens(request: CountTokensParameters): Promise; embedContent(request: EmbedContentParameters): Promise; userTier?: UserTierId; } export type ContentGeneratorConfig = { model: string; apiKey?: string; vertexai?: boolean; providerManager?: ProviderManager; proxy?: string; }; export declare function createContentGeneratorConfig(config: Config): ContentGeneratorConfig; export declare function createContentGenerator(config: ContentGeneratorConfig, gcConfig: Config, sessionId?: string): Promise;