@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/index.node.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { FirebaseError, Deferred, getModularInstance } from '@firebase/util';
|
|
|
4
4
|
import { Logger } from '@firebase/logger';
|
|
5
5
|
|
|
6
6
|
var name = "@firebase/ai";
|
|
7
|
-
var version = "2.10.0-canary.
|
|
7
|
+
var version = "2.10.0-canary.bfb9accdc";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @license
|
|
@@ -605,6 +605,11 @@ const SchemaType = {
|
|
|
605
605
|
* and the {@link https://cloud.google.com/vertex-ai/generative-ai/docs/image/responsible-ai-imagen#safety-filters | Responsible AI and usage guidelines}
|
|
606
606
|
* for more details.
|
|
607
607
|
*
|
|
608
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
609
|
+
* early as June 2026. As a replacement, you can
|
|
610
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
611
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
612
|
+
*
|
|
608
613
|
* @public
|
|
609
614
|
*/
|
|
610
615
|
const ImagenSafetyFilterLevel = {
|
|
@@ -634,6 +639,11 @@ const ImagenSafetyFilterLevel = {
|
|
|
634
639
|
* See the <a href="http://firebase.google.com/docs/vertex-ai/generate-images">personGeneration</a>
|
|
635
640
|
* documentation for more details.
|
|
636
641
|
*
|
|
642
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
643
|
+
* early as June 2026. As a replacement, you can
|
|
644
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
645
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
646
|
+
*
|
|
637
647
|
* @public
|
|
638
648
|
*/
|
|
639
649
|
const ImagenPersonFilterLevel = {
|
|
@@ -667,6 +677,11 @@ const ImagenPersonFilterLevel = {
|
|
|
667
677
|
* See the {@link http://firebase.google.com/docs/vertex-ai/generate-images | documentation }
|
|
668
678
|
* for more details and examples of the supported aspect ratios.
|
|
669
679
|
*
|
|
680
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
681
|
+
* early as June 2026. As a replacement, you can
|
|
682
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
683
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
684
|
+
*
|
|
670
685
|
* @public
|
|
671
686
|
*/
|
|
672
687
|
const ImagenAspectRatio = {
|
|
@@ -2834,8 +2849,9 @@ function validateGenerationConfig(generationConfig) {
|
|
|
2834
2849
|
}
|
|
2835
2850
|
if ((generationConfig.responseSchema != null ||
|
|
2836
2851
|
generationConfig.responseJsonSchema != null) &&
|
|
2837
|
-
generationConfig.responseMimeType) {
|
|
2838
|
-
throw new AIError(AIErrorCode.UNSUPPORTED, `responseMimeType must be set
|
|
2852
|
+
generationConfig.responseMimeType !== 'application/json') {
|
|
2853
|
+
throw new AIError(AIErrorCode.UNSUPPORTED, `responseMimeType must be set to "application/json" if` +
|
|
2854
|
+
` responseSchema or responseJsonSchema are set.`);
|
|
2839
2855
|
}
|
|
2840
2856
|
}
|
|
2841
2857
|
|
|
@@ -3267,6 +3283,11 @@ class LiveGenerativeModel extends AIModel {
|
|
|
3267
3283
|
* }
|
|
3268
3284
|
* ```
|
|
3269
3285
|
*
|
|
3286
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
3287
|
+
* early as June 2026. As a replacement, you can
|
|
3288
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
3289
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
3290
|
+
*
|
|
3270
3291
|
* @public
|
|
3271
3292
|
*/
|
|
3272
3293
|
class ImagenModel extends AIModel {
|
|
@@ -3598,7 +3619,10 @@ class TemplateGenerativeModel {
|
|
|
3598
3619
|
*
|
|
3599
3620
|
* This class should only be instantiated with {@link getTemplateImagenModel}.
|
|
3600
3621
|
*
|
|
3601
|
-
* @
|
|
3622
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
3623
|
+
* early as June 2026. As a replacement, you can
|
|
3624
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
3625
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
3602
3626
|
*/
|
|
3603
3627
|
class TemplateImagenModel {
|
|
3604
3628
|
/**
|
|
@@ -3907,6 +3931,11 @@ class AnyOfSchema extends Schema {
|
|
|
3907
3931
|
* }
|
|
3908
3932
|
* ```
|
|
3909
3933
|
*
|
|
3934
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
3935
|
+
* early as June 2026. As a replacement, you can
|
|
3936
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
3937
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
3938
|
+
*
|
|
3910
3939
|
* @public
|
|
3911
3940
|
*/
|
|
3912
3941
|
class ImagenImageFormat {
|
|
@@ -4407,6 +4436,11 @@ function getGenerativeModel(ai, modelParams, requestOptions) {
|
|
|
4407
4436
|
*
|
|
4408
4437
|
* Only Imagen 3 models (named `imagen-3.0-*`) are supported.
|
|
4409
4438
|
*
|
|
4439
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
4440
|
+
* early as June 2026. As a replacement, you can
|
|
4441
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
4442
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
4443
|
+
*
|
|
4410
4444
|
* @param ai - An {@link AI} instance.
|
|
4411
4445
|
* @param modelParams - Parameters to use when making Imagen requests.
|
|
4412
4446
|
* @param requestOptions - Additional options to use when making requests.
|
|
@@ -4457,10 +4491,13 @@ function getTemplateGenerativeModel(ai, requestOptions) {
|
|
|
4457
4491
|
* Returns a {@link TemplateImagenModel} class for executing server-side
|
|
4458
4492
|
* Imagen templates.
|
|
4459
4493
|
*
|
|
4494
|
+
* @deprecated All Imagen models are deprecated and will shut down as
|
|
4495
|
+
* early as June 2026. As a replacement, you can
|
|
4496
|
+
* {@link https://firebase.google.com/docs/ai-logic/imagen-models-migration |
|
|
4497
|
+
* migrate your apps to use Gemini Image models (the "Nano Banana" models)}.
|
|
4498
|
+
*
|
|
4460
4499
|
* @param ai - An {@link AI} instance.
|
|
4461
4500
|
* @param requestOptions - Additional options to use when making requests.
|
|
4462
|
-
*
|
|
4463
|
-
* @beta
|
|
4464
4501
|
*/
|
|
4465
4502
|
function getTemplateImagenModel(ai, requestOptions) {
|
|
4466
4503
|
return new TemplateImagenModel(ai, requestOptions);
|