@firebase/ai 2.10.0-canary.ba0bc39bb → 2.10.0-canary.bfb9accdc
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai-public.d.ts +85 -3
- package/dist/ai.d.ts +85 -3
- package/dist/esm/index.esm.js +43 -6
- package/dist/esm/index.esm.js.map +1 -1
- package/dist/esm/src/api.d.ts +10 -2
- package/dist/esm/src/models/generative-model.d.ts +5 -0
- package/dist/esm/src/models/imagen-model.d.ts +5 -0
- package/dist/esm/src/models/template-imagen-model.d.ts +4 -1
- package/dist/esm/src/requests/imagen-image-format.d.ts +5 -0
- package/dist/esm/src/types/imagen/requests.d.ts +45 -0
- package/dist/esm/src/types/imagen/responses.d.ts +16 -0
- package/dist/index.cjs.js +43 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.node.cjs.js +43 -6
- package/dist/index.node.cjs.js.map +1 -1
- package/dist/index.node.mjs +43 -6
- package/dist/index.node.mjs.map +1 -1
- package/dist/src/api.d.ts +10 -2
- package/dist/src/models/generative-model.d.ts +5 -0
- package/dist/src/models/imagen-model.d.ts +5 -0
- package/dist/src/models/template-imagen-model.d.ts +4 -1
- package/dist/src/requests/imagen-image-format.d.ts +5 -0
- package/dist/src/types/imagen/requests.d.ts +45 -0
- package/dist/src/types/imagen/responses.d.ts +16 -0
- package/package.json +8 -8
package/dist/src/api.d.ts
CHANGED
|
@@ -76,6 +76,11 @@ export declare function getGenerativeModel(ai: AI, modelParams: ModelParams | Hy
|
|
|
76
76
|
*
|
|
77
77
|
* Only Imagen 3 models (named `imagen-3.0-*`) are supported.
|
|
78
78
|
*
|
|
79
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
80
|
+
* early as June 2026. As a replacement, you can
|
|
81
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
82
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
83
|
+
*
|
|
79
84
|
* @param ai - An {@link AI} instance.
|
|
80
85
|
* @param modelParams - Parameters to use when making Imagen requests.
|
|
81
86
|
* @param requestOptions - Additional options to use when making requests.
|
|
@@ -113,9 +118,12 @@ export declare function getTemplateGenerativeModel(ai: AI, requestOptions?: Requ
|
|
|
113
118
|
* Returns a {@link TemplateImagenModel} class for executing server-side
|
|
114
119
|
* Imagen templates.
|
|
115
120
|
*
|
|
121
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
122
|
+
* early as June 2026. As a replacement, you can
|
|
123
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
124
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
125
|
+
*
|
|
116
126
|
* @param ai - An {@link AI} instance.
|
|
117
127
|
* @param requestOptions - Additional options to use when making requests.
|
|
118
|
-
*
|
|
119
|
-
* @beta
|
|
120
128
|
*/
|
|
121
129
|
export declare function getTemplateImagenModel(ai: AI, requestOptions?: RequestOptions): TemplateImagenModel;
|
|
@@ -54,3 +54,8 @@ export declare class GenerativeModel extends AIModel {
|
|
|
54
54
|
*/
|
|
55
55
|
countTokens(request: CountTokensRequest | string | Array<string | Part>, singleRequestOptions?: SingleRequestOptions): Promise<CountTokensResponse>;
|
|
56
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Client-side validation of some common `GenerationConfig` pitfalls, in order
|
|
59
|
+
* to save the developer a wasted request.
|
|
60
|
+
*/
|
|
61
|
+
export declare function validateGenerationConfig(generationConfig: GenerationConfig): void;
|
|
@@ -37,6 +37,11 @@ import { AIModel } from './ai-model';
|
|
|
37
37
|
* }
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
41
|
+
* early as June 2026. As a replacement, you can
|
|
42
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
43
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
44
|
+
*
|
|
40
45
|
* @public
|
|
41
46
|
*/
|
|
42
47
|
export declare class ImagenModel extends AIModel {
|
|
@@ -22,7 +22,10 @@ import { ApiSettings } from '../types/internal';
|
|
|
22
22
|
*
|
|
23
23
|
* This class should only be instantiated with {@link getTemplateImagenModel}.
|
|
24
24
|
*
|
|
25
|
-
* @
|
|
25
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
26
|
+
* early as June 2026. As a replacement, you can
|
|
27
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
28
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
26
29
|
*/
|
|
27
30
|
export declare class TemplateImagenModel {
|
|
28
31
|
/**
|
|
@@ -29,6 +29,11 @@
|
|
|
29
29
|
* }
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
33
|
+
* early as June 2026. As a replacement, you can
|
|
34
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
35
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
36
|
+
*
|
|
32
37
|
* @public
|
|
33
38
|
*/
|
|
34
39
|
export declare class ImagenImageFormat {
|
|
@@ -18,6 +18,11 @@ import { ImagenImageFormat } from '../../requests/imagen-image-format';
|
|
|
18
18
|
/**
|
|
19
19
|
* Parameters for configuring an {@link ImagenModel}.
|
|
20
20
|
*
|
|
21
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
22
|
+
* early as June 2026. As a replacement, you can
|
|
23
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
24
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
25
|
+
*
|
|
21
26
|
* @public
|
|
22
27
|
*/
|
|
23
28
|
export interface ImagenModelParams {
|
|
@@ -46,6 +51,11 @@ export interface ImagenModelParams {
|
|
|
46
51
|
* See the {@link http://firebase.google.com/docs/vertex-ai/generate-images-imagen | documentation} for
|
|
47
52
|
* more details.
|
|
48
53
|
*
|
|
54
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
55
|
+
* early as June 2026. As a replacement, you can
|
|
56
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
57
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
58
|
+
*
|
|
49
59
|
* @public
|
|
50
60
|
*/
|
|
51
61
|
export interface ImagenGenerationConfig {
|
|
@@ -104,6 +114,11 @@ export interface ImagenGenerationConfig {
|
|
|
104
114
|
* and the {@link https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#safety-filters | Responsible AI and usage guidelines}
|
|
105
115
|
* for more details.
|
|
106
116
|
*
|
|
117
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
118
|
+
* early as June 2026. As a replacement, you can
|
|
119
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
120
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
121
|
+
*
|
|
107
122
|
* @public
|
|
108
123
|
*/
|
|
109
124
|
export declare const ImagenSafetyFilterLevel: {
|
|
@@ -137,6 +152,11 @@ export declare const ImagenSafetyFilterLevel: {
|
|
|
137
152
|
* and the {@link https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#safety-filters | Responsible AI and usage guidelines}
|
|
138
153
|
* for more details.
|
|
139
154
|
*
|
|
155
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
156
|
+
* early as June 2026. As a replacement, you can
|
|
157
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
158
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
159
|
+
*
|
|
140
160
|
* @public
|
|
141
161
|
*/
|
|
142
162
|
export type ImagenSafetyFilterLevel = (typeof ImagenSafetyFilterLevel)[keyof typeof ImagenSafetyFilterLevel];
|
|
@@ -146,6 +166,11 @@ export type ImagenSafetyFilterLevel = (typeof ImagenSafetyFilterLevel)[keyof typ
|
|
|
146
166
|
* See the <a href="http://firebase.google.com/docs/vertex-ai/generate-images">personGeneration</a>
|
|
147
167
|
* documentation for more details.
|
|
148
168
|
*
|
|
169
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
170
|
+
* early as June 2026. As a replacement, you can
|
|
171
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
172
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
173
|
+
*
|
|
149
174
|
* @public
|
|
150
175
|
*/
|
|
151
176
|
export declare const ImagenPersonFilterLevel: {
|
|
@@ -176,6 +201,11 @@ export declare const ImagenPersonFilterLevel: {
|
|
|
176
201
|
* See the <a href="http://firebase.google.com/docs/vertex-ai/generate-images">personGeneration</a>
|
|
177
202
|
* documentation for more details.
|
|
178
203
|
*
|
|
204
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
205
|
+
* early as June 2026. As a replacement, you can
|
|
206
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
207
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
208
|
+
*
|
|
179
209
|
* @public
|
|
180
210
|
*/
|
|
181
211
|
export type ImagenPersonFilterLevel = (typeof ImagenPersonFilterLevel)[keyof typeof ImagenPersonFilterLevel];
|
|
@@ -185,6 +215,11 @@ export type ImagenPersonFilterLevel = (typeof ImagenPersonFilterLevel)[keyof typ
|
|
|
185
215
|
* See the {@link http://firebase.google.com/docs/vertex-ai/generate-images | documentation }
|
|
186
216
|
* for more details.
|
|
187
217
|
*
|
|
218
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
219
|
+
* early as June 2026. As a replacement, you can
|
|
220
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
221
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
222
|
+
*
|
|
188
223
|
* @public
|
|
189
224
|
*/
|
|
190
225
|
export interface ImagenSafetySettings {
|
|
@@ -207,6 +242,11 @@ export interface ImagenSafetySettings {
|
|
|
207
242
|
* See the {@link http://firebase.google.com/docs/vertex-ai/generate-images | documentation }
|
|
208
243
|
* for more details and examples of the supported aspect ratios.
|
|
209
244
|
*
|
|
245
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
246
|
+
* early as June 2026. As a replacement, you can
|
|
247
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
248
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
249
|
+
*
|
|
210
250
|
* @public
|
|
211
251
|
*/
|
|
212
252
|
export declare const ImagenAspectRatio: {
|
|
@@ -240,6 +280,11 @@ export declare const ImagenAspectRatio: {
|
|
|
240
280
|
* See the {@link http://firebase.google.com/docs/vertex-ai/generate-images | documentation }
|
|
241
281
|
* for more details and examples of the supported aspect ratios.
|
|
242
282
|
*
|
|
283
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
284
|
+
* early as June 2026. As a replacement, you can
|
|
285
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
286
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
287
|
+
*
|
|
243
288
|
* @public
|
|
244
289
|
*/
|
|
245
290
|
export type ImagenAspectRatio = (typeof ImagenAspectRatio)[keyof typeof ImagenAspectRatio];
|
|
@@ -17,6 +17,11 @@
|
|
|
17
17
|
/**
|
|
18
18
|
* An image generated by Imagen, represented as inline data.
|
|
19
19
|
*
|
|
20
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
21
|
+
* early as June 2026. As a replacement, you can
|
|
22
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
23
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
24
|
+
*
|
|
20
25
|
* @public
|
|
21
26
|
*/
|
|
22
27
|
export interface ImagenInlineImage {
|
|
@@ -35,6 +40,12 @@ export interface ImagenInlineImage {
|
|
|
35
40
|
* An image generated by Imagen, stored in a Cloud Storage for Firebase bucket.
|
|
36
41
|
*
|
|
37
42
|
* This feature is not available yet.
|
|
43
|
+
*
|
|
44
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
45
|
+
* early as June 2026. As a replacement, you can
|
|
46
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
47
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
48
|
+
*
|
|
38
49
|
* @public
|
|
39
50
|
*/
|
|
40
51
|
export interface ImagenGCSImage {
|
|
@@ -54,6 +65,11 @@ export interface ImagenGCSImage {
|
|
|
54
65
|
/**
|
|
55
66
|
* The response from a request to generate images with Imagen.
|
|
56
67
|
*
|
|
68
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
69
|
+
* early as June 2026. As a replacement, you can
|
|
70
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
71
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
72
|
+
*
|
|
57
73
|
* @public
|
|
58
74
|
*/
|
|
59
75
|
export interface ImagenGenerationResponse<T extends ImagenInlineImage | ImagenGCSImage> {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/ai",
|
|
3
|
-
"version": "2.10.0-canary.
|
|
3
|
+
"version": "2.10.0-canary.bfb9accdc",
|
|
4
4
|
"description": "The Firebase AI SDK",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"engines": {
|
|
@@ -48,19 +48,19 @@
|
|
|
48
48
|
"trusted-type-check": "tsec -p tsconfig.json --noEmit"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@firebase/app": "0.14.10-canary.
|
|
52
|
-
"@firebase/app-types": "0.9.3-canary.
|
|
51
|
+
"@firebase/app": "0.14.10-canary.bfb9accdc",
|
|
52
|
+
"@firebase/app-types": "0.9.3-canary.bfb9accdc"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@firebase/app-check-interop-types": "0.3.3-canary.
|
|
56
|
-
"@firebase/component": "0.7.2-canary.
|
|
57
|
-
"@firebase/logger": "0.5.0-canary.
|
|
58
|
-
"@firebase/util": "1.15.0-canary.
|
|
55
|
+
"@firebase/app-check-interop-types": "0.3.3-canary.bfb9accdc",
|
|
56
|
+
"@firebase/component": "0.7.2-canary.bfb9accdc",
|
|
57
|
+
"@firebase/logger": "0.5.0-canary.bfb9accdc",
|
|
58
|
+
"@firebase/util": "1.15.0-canary.bfb9accdc",
|
|
59
59
|
"tslib": "^2.1.0"
|
|
60
60
|
},
|
|
61
61
|
"license": "Apache-2.0",
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@firebase/app": "0.14.10-canary.
|
|
63
|
+
"@firebase/app": "0.14.10-canary.bfb9accdc",
|
|
64
64
|
"@rollup/plugin-json": "6.1.0",
|
|
65
65
|
"rollup": "2.79.2",
|
|
66
66
|
"rollup-plugin-replace": "2.2.0",
|