You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added support for querying imagen models to generate images both in gcs
and inline. Documentation incoming in a separate PR for readability
---------
Co-authored-by: David Motsonashvili <[email protected]>
Co-authored-by: rachelsaunders <[email protected]>
Co-authored-by: Daymon <[email protected]>
method public com.google.firebase.vertexai.Chat startChat(java.util.List<com.google.firebase.vertexai.type.Content> history = emptyList());
56
60
}
57
61
62
+
@com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenModel {
63
+
method public suspend Object? generateImages(String prompt, kotlin.coroutines.Continuation<? super com.google.firebase.vertexai.type.ImagenGenerationResponse<com.google.firebase.vertexai.type.ImagenInlineImage>>);
public final class ContentBlockedException extends com.google.firebase.vertexai.type.FirebaseVertexAIException {
186
+
}
187
+
166
188
public final class ContentKt {
167
189
method public static com.google.firebase.vertexai.type.Content content(String? role = "user", kotlin.jvm.functions.Function1<? super com.google.firebase.vertexai.type.Content.Builder,kotlin.Unit> init);
method public com.google.firebase.vertexai.type.ImagenAspectRatio? getAspectRatio();
417
+
method public com.google.firebase.vertexai.type.ImagenImageFormat? getImageFormat();
418
+
method public String? getNegativePrompt();
419
+
method public Integer? getNumberOfImages();
420
+
property public final Boolean? addWatermark;
421
+
property public final com.google.firebase.vertexai.type.ImagenAspectRatio? aspectRatio;
422
+
property public final com.google.firebase.vertexai.type.ImagenImageFormat? imageFormat;
423
+
property public final String? negativePrompt;
424
+
property public final Integer? numberOfImages;
425
+
field public static final com.google.firebase.vertexai.type.ImagenGenerationConfig.Companion Companion;
426
+
}
427
+
428
+
public static final class ImagenGenerationConfig.Builder {
429
+
ctor public ImagenGenerationConfig.Builder();
430
+
method public com.google.firebase.vertexai.type.ImagenGenerationConfig build();
431
+
field public Boolean? addWatermark;
432
+
field public com.google.firebase.vertexai.type.ImagenAspectRatio? aspectRatio;
433
+
field public com.google.firebase.vertexai.type.ImagenImageFormat? imageFormat;
434
+
field public String? negativePrompt;
435
+
field public Integer? numberOfImages;
436
+
}
437
+
438
+
public static final class ImagenGenerationConfig.Companion {
439
+
method public com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder builder();
440
+
}
441
+
442
+
public final class ImagenGenerationConfigKt {
443
+
method @com.google.firebase.vertexai.type.PublicPreviewAPI public static com.google.firebase.vertexai.type.ImagenGenerationConfig imagenGenerationConfig(kotlin.jvm.functions.Function1<? super com.google.firebase.vertexai.type.ImagenGenerationConfig.Builder,kotlin.Unit> init);
444
+
}
445
+
446
+
@com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenGenerationResponse<T> {
447
+
method public String? getFilteredReason();
448
+
method public java.util.List<T> getImages();
449
+
property public final String? filteredReason;
450
+
property public final java.util.List<T> images;
451
+
}
452
+
453
+
@com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenImageFormat {
454
+
method public Integer? getCompressionQuality();
455
+
method public String getMimeType();
456
+
property public final Integer? compressionQuality;
457
+
property public final String mimeType;
458
+
field public static final com.google.firebase.vertexai.type.ImagenImageFormat.Companion Companion;
459
+
}
460
+
461
+
public static final class ImagenImageFormat.Companion {
462
+
method public com.google.firebase.vertexai.type.ImagenImageFormat jpeg(Integer? compressionQuality = null);
463
+
method public com.google.firebase.vertexai.type.ImagenImageFormat png();
464
+
}
465
+
466
+
@com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenInlineImage {
467
+
method public android.graphics.Bitmap asBitmap();
468
+
method public byte[] getData();
469
+
method public String getMimeType();
470
+
property public final byte[] data;
471
+
property public final String mimeType;
472
+
}
473
+
474
+
@com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenPersonFilterLevel {
475
+
field public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel ALLOW_ADULT;
476
+
field public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel ALLOW_ALL;
477
+
field public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel BLOCK_ALL;
478
+
field public static final com.google.firebase.vertexai.type.ImagenPersonFilterLevel.Companion Companion;
479
+
}
480
+
481
+
public static final class ImagenPersonFilterLevel.Companion {
482
+
}
483
+
484
+
@com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenSafetyFilterLevel {
485
+
field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_LOW_AND_ABOVE;
486
+
field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_MEDIUM_AND_ABOVE;
487
+
field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_NONE;
488
+
field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel BLOCK_ONLY_HIGH;
489
+
field public static final com.google.firebase.vertexai.type.ImagenSafetyFilterLevel.Companion Companion;
490
+
}
491
+
492
+
public static final class ImagenSafetyFilterLevel.Companion {
493
+
}
494
+
495
+
@com.google.firebase.vertexai.type.PublicPreviewAPI public final class ImagenSafetySettings {
496
+
ctor public ImagenSafetySettings(com.google.firebase.vertexai.type.ImagenSafetyFilterLevel safetyFilterLevel, com.google.firebase.vertexai.type.ImagenPersonFilterLevel personFilterLevel);
497
+
}
498
+
379
499
public final class InlineDataPart implements com.google.firebase.vertexai.type.Part {
380
500
ctor public InlineDataPart(byte[] inlineData, String mimeType);
property public final java.util.List<com.google.firebase.vertexai.type.SafetyRating> safetyRatings;
428
548
}
429
549
550
+
@kotlin.RequiresOptIn(level=kotlin.RequiresOptIn.Level.ERROR, message="This API is part of an experimental public preview and may change in " + "backwards-incompatible ways without notice.") @kotlin.annotation.Retention(kotlin.annotation.AnnotationRetention.BINARY) public @interface PublicPreviewAPI {
551
+
}
552
+
430
553
public final class RequestOptions {
431
554
ctor public RequestOptions();
432
555
ctor public RequestOptions(long timeoutInMillis = 180.seconds.inWholeMilliseconds);
0 commit comments