diff options
| author | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
|---|---|---|
| committer | altaf-creator <dev@altafcreator.com> | 2025-11-09 11:15:19 +0800 |
| commit | 8eff962cab608341a6f2fedc640a0e32d96f26e2 (patch) | |
| tree | 05534d1a720ddc3691d346c69b4972555820a061 /frontend-old/node_modules/@firebase/ai/dist/src/api.d.ts | |
pain
Diffstat (limited to 'frontend-old/node_modules/@firebase/ai/dist/src/api.d.ts')
| -rw-r--r-- | frontend-old/node_modules/@firebase/ai/dist/src/api.d.ts | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/frontend-old/node_modules/@firebase/ai/dist/src/api.d.ts b/frontend-old/node_modules/@firebase/ai/dist/src/api.d.ts new file mode 100644 index 0000000..491268b --- /dev/null +++ b/frontend-old/node_modules/@firebase/ai/dist/src/api.d.ts @@ -0,0 +1,99 @@ +/** + * @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 { AI_TYPE } from './constants'; +import { AIService } from './service'; +import { AI, AIOptions } from './public-types'; +import { ImagenModelParams, HybridParams, ModelParams, RequestOptions, LiveModelParams } from './types'; +import { AIError } from './errors'; +import { AIModel, GenerativeModel, LiveGenerativeModel, ImagenModel } from './models'; +export { ChatSession } from './methods/chat-session'; +export { LiveSession } from './methods/live-session'; +export * from './requests/schema-builder'; +export { ImagenImageFormat } from './requests/imagen-image-format'; +export { AIModel, GenerativeModel, LiveGenerativeModel, ImagenModel, AIError }; +export { Backend, VertexAIBackend, GoogleAIBackend } from './backend'; +export { startAudioConversation, AudioConversationController, StartAudioConversationOptions } from './methods/live-session-helpers'; +declare module '@firebase/component' { + interface NameServiceMapping { + [AI_TYPE]: AIService; + } +} +/** + * Returns the default {@link AI} instance that is associated with the provided + * {@link @firebase/app#FirebaseApp}. If no instance exists, initializes a new instance with the + * default settings. + * + * @example + * ```javascript + * const ai = getAI(app); + * ``` + * + * @example + * ```javascript + * // Get an AI instance configured to use the Gemini Developer API (via Google AI). + * const ai = getAI(app, { backend: new GoogleAIBackend() }); + * ``` + * + * @example + * ```javascript + * // Get an AI instance configured to use the Vertex AI Gemini API. + * const ai = getAI(app, { backend: new VertexAIBackend() }); + * ``` + * + * @param app - The {@link @firebase/app#FirebaseApp} to use. + * @param options - {@link AIOptions} that configure the AI instance. + * @returns The default {@link AI} instance for the given {@link @firebase/app#FirebaseApp}. + * + * @public + */ +export declare function getAI(app?: FirebaseApp, options?: AIOptions): AI; +/** + * Returns a {@link GenerativeModel} class with methods for inference + * and other functionality. + * + * @public + */ +export declare function getGenerativeModel(ai: AI, modelParams: ModelParams | HybridParams, requestOptions?: RequestOptions): GenerativeModel; +/** + * Returns an {@link ImagenModel} class with methods for using Imagen. + * + * Only Imagen 3 models (named `imagen-3.0-*`) are supported. + * + * @param ai - An {@link AI} instance. + * @param modelParams - Parameters to use when making Imagen requests. + * @param requestOptions - Additional options to use when making requests. + * + * @throws If the `apiKey` or `projectId` fields are missing in your + * Firebase config. + * + * @public + */ +export declare function getImagenModel(ai: AI, modelParams: ImagenModelParams, requestOptions?: RequestOptions): ImagenModel; +/** + * Returns a {@link LiveGenerativeModel} class for real-time, bidirectional communication. + * + * The Live API is only supported in modern browser windows and Node >= 22. + * + * @param ai - An {@link AI} instance. + * @param modelParams - Parameters to use when setting up a {@link LiveSession}. + * @throws If the `apiKey` or `projectId` fields are missing in your + * Firebase config. + * + * @beta + */ +export declare function getLiveGenerativeModel(ai: AI, modelParams: LiveModelParams): LiveGenerativeModel; |
