-
Notifications
You must be signed in to change notification settings - Fork 596
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: David Motsonashvili <davidmotson@google.com> Co-authored-by: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com>
- Loading branch information
1 parent
9a4838c
commit be2313d
Showing
14 changed files
with
338 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...se-vertexai/src/main/kotlin/com/google/firebase/vertexai/internal/GenerateImageRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...e-vertexai/src/main/kotlin/com/google/firebase/vertexai/internal/GenerateImageResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...exai/src/main/kotlin/com/google/firebase/vertexai/internal/util/AppCheckHeaderProvider.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenAspectRatio.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,33 @@ | ||
/* | ||
* Copyright 2025 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. | ||
*/ | ||
|
||
package com.google.firebase.vertexai.type | ||
|
||
/** Represents the aspect ratio that the generated image should conform to. */ | ||
public class ImagenAspectRatio private constructor(internal val internalVal: String) { | ||
public companion object { | ||
/** A square image, useful for icons, profile pictures, etc. */ | ||
@JvmField public val SQUARE_1x1: ImagenAspectRatio = ImagenAspectRatio("1:1") | ||
/** A portrait image in 3:4, the aspect ratio of older TVs. */ | ||
@JvmField public val PORTRAIT_3x4: ImagenAspectRatio = ImagenAspectRatio("3:4") | ||
/** A landscape image in 4:3, the aspect ratio of older TVs. */ | ||
@JvmField public val LANDSCAPE_4x3: ImagenAspectRatio = ImagenAspectRatio("4:3") | ||
/** A portrait image in 9:16, the aspect ratio of modern monitors and phone screens. */ | ||
@JvmField public val PORTRAIT_9x16: ImagenAspectRatio = ImagenAspectRatio("9:16") | ||
/** A landscape image in 16:9, the aspect ratio of modern monitors and phone screens. */ | ||
@JvmField public val LANDSCAPE_16x9: ImagenAspectRatio = ImagenAspectRatio("16:9") | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGCSImage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,26 @@ | ||
/* | ||
* Copyright 2025 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. | ||
*/ | ||
|
||
package com.google.firebase.vertexai.type | ||
|
||
/** | ||
* Represents an Imagen-generated image that is contained in Google Cloud Storage. | ||
* | ||
* @param gcsUri Contains the `gs://` URI for the image. | ||
* @param mimeType Contains the MIME type of the image (for example, `"image/png"`). | ||
*/ | ||
public class ImagenGCSImage | ||
internal constructor(public val gcsUri: String, public val mimeType: String) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...se-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,27 @@ | ||
/* | ||
* Copyright 2025 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. | ||
*/ | ||
|
||
package com.google.firebase.vertexai.type | ||
|
||
/** | ||
* Represents a response from a call to [ImagenModel#generateImages] | ||
* | ||
* @param images contains the generated images | ||
* @param filteredReason if fewer images were generated than were requested, this field will contain | ||
* the reason they were filtered out. | ||
*/ | ||
public class ImagenGenerationResponse<T> | ||
internal constructor(public val images: List<T>, public val filteredReason: String?) {} |
30 changes: 30 additions & 0 deletions
30
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.