/**
 * @license
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { FirebaseApp } from '@firebase/app';
import { Backend } from './backend';
import { Content, GenerateContentResult, GenerateContentStreamResult, Part, RequestOptions, SingleRequestOptions, StartTemplateChatParams } from './types';
export * from './types';
/**
 * An instance of the Firebase AI SDK.
 *
 * Do not create this instance directly. Instead, use {@link getAI | getAI()}.
 *
 * @public
 */
export interface AI {
    /**
     * The {@link @firebase/app#FirebaseApp} this {@link AI} instance is associated with.
     */
    app: FirebaseApp;
    /**
     * A {@link Backend} instance that specifies the configuration for the target backend,
     * either the Gemini Developer API (using {@link GoogleAIBackend}) or the
     * Agent Platform Gemini API (using {@link AgentPlatformBackend}).
     */
    backend: Backend;
    /**
     * Options applied to this {@link AI} instance.
     */
    options?: AIOptions;
    /**
     * @deprecated use `AI.backend.location` instead.
     *
     * The location configured for this AI service instance, relevant for
     * Agent Platform Gemini API backends.
     */
    location: string;
}
/**
 * An enum-like object containing constants that represent the supported backends
 * for the Firebase AI SDK.
 * This determines which backend service (Gemini Developer API or Agent Platform Gemini API)
 * the SDK will communicate with.
 *
 * These values are assigned to the `backendType` property within the specific backend
 * configuration objects ({@link GoogleAIBackend} or {@link AgentPlatformBackend}) to identify
 * which service to target.
 *
 * @public
 */
export declare const BackendType: {
    /**
     * Identifies the backend service for the Agent Platform Gemini API provided through Google Cloud.
     * Use this constant when creating a {@link AgentPlatformBackend} configuration.
     */
    readonly AGENT_PLATFORM: "AGENT_PLATFORM";
    /**
     * Identifies the backend service for the Agent Platform Gemini API
     * (formerly known as Vertex AI Gemini API) provided through Google Cloud.
     * Use this constant when creating a {@link VertexAIBackend} configuration.
     * @deprecated - Use {@link AgentPlatformBackend} instead.
     */
    readonly VERTEX_AI: "VERTEX_AI";
    /**
     * Identifies the backend service for the Gemini Developer API ({@link https://ai.google/ | Google AI}).
     * Use this constant when creating a {@link GoogleAIBackend} configuration.
     */
    readonly GOOGLE_AI: "GOOGLE_AI";
};
/**
 * Type alias representing valid backend types.
 * It should be either `'AGENT_PLATFORM'` or `'GOOGLE_AI'` (`'VERTEX_AI'` is deprecated).
 *
 * @public
 */
export type BackendType = (typeof BackendType)[keyof typeof BackendType];
/**
 * Options for initializing the AI service using {@link getAI | getAI()}.
 * This allows specifying which backend to use (Gemini Developer API or Agent Platform Gemini API)
 * and configuring its specific options (like location for Agent Platform).
 *
 * @public
 */
export interface AIOptions {
    /**
     * The backend configuration to use for the AI service instance.
     * Defaults to the Gemini Developer API backend ({@link GoogleAIBackend}).
     */
    backend?: Backend;
    /**
     * Whether to use App Check limited use tokens. Defaults to false.
     */
    useLimitedUseAppCheckTokens?: boolean;
}
/**
 * Interface representing a `ChatSession` class for use with server
 * prompt templates that enables sending chat messages and stores
 * history of sent and received messages so far.
 *
 * @beta
 */
export interface TemplateChatSession {
    params: StartTemplateChatParams;
    requestOptions?: RequestOptions;
    /**
     * Sends a chat message and receives a non-streaming
     * {@link GenerateContentResult}
     */
    sendMessage(request: string | Array<string | Part>, singleRequestOptions?: SingleRequestOptions): Promise<GenerateContentResult>;
    /**
     * Sends a chat message and receives the response as a
     * {@link GenerateContentStreamResult} containing an iterable stream
     * and a response promise.
     */
    sendMessageStream(request: string | Array<string | Part>, singleRequestOptions?: SingleRequestOptions): Promise<GenerateContentStreamResult>;
    /**
     * Gets the chat history so far. Blocked prompts are not added to history.
     * Neither blocked candidates nor the prompts that generated them are added
     * to history.
     */
    getHistory(): Promise<Content[]>;
}
