/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import type { CountTokensResponse, GenerateContentResponse, GenerateContentParameters, CountTokensParameters, EmbedContentResponse, EmbedContentParameters } from '@google/genai'; import type { Config } from '../config/config.js'; import type { 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 declare enum AuthType { LOGIN_WITH_GOOGLE = "oauth-personal", USE_GEMINI = "gemini-api-key", USE_VERTEX_AI = "vertex-ai", CLOUD_SHELL = "cloud-shell" } export type ContentGeneratorConfig = { apiKey?: string; vertexai?: boolean; authType?: AuthType; proxy?: string; }; export declare function createContentGeneratorConfig(config: Config, authType: AuthType | undefined): Promise; export declare function createContentGenerator(config: ContentGeneratorConfig, gcConfig: Config, sessionId?: string): Promise;