-
Notifications
You must be signed in to change notification settings - Fork 642
Add documentation to imagen #6616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
davidmotson
merged 27 commits into
davidmotson.imagen_support
from
davidmotson.imagen_docs
Jan 30, 2025
Merged
Changes from 9 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
2c18396
Add documentation to imagen
3bfde82
formatting
269cda9
Merge branch 'davidmotson.imagen_support' into davidmotson.imagen_docs
316e187
format
fcd6bb6
minor doc fix in ImagenImageFormat
83a29c1
Merge branch 'davidmotson.imagen_support' into davidmotson.imagen_docs
67e1dfe
format
4d40615
format fixes
c3a3115
add copyright to appcheckheaderprovider
42326fe
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 8350453
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 800da6e
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson ef1f5f3
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 7830a1b
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 4416e1f
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 2e76e1e
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 9488bf8
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 9312a81
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 0c917b5
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson e20d2ed
Merge branch 'davidmotson.imagen_support' into davidmotson.imagen_docs
2dcce15
extra fixes for comments
7859a7f
add documentation to ImagenGenerationConfig.Builder
21d7082
update description of gcsURI
0c82fff
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson fe6ca34
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson b7ef0e1
Update firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai…
davidmotson 51af553
update description for Imagen-generated images
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 Image that is contained in Google Cloud Storage. | ||
davidmotson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* | ||
* @param gcsUri Contains the gs:// uri for the image. | ||
davidmotson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* @param mimeType Contains the mime type of the image eg. "image/png" | ||
davidmotson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
*/ | ||
public class ImagenGCSImage | ||
internal constructor(public val gcsUri: String, public val mimeType: String) {} |
26 changes: 26 additions & 0 deletions
26
...base-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenGenerationConfig.kt
This file contains hidden or 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 hidden or 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 Imagen call to [ImageModel#generateImages] | ||
davidmotson marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* | ||
* @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?) {} |
23 changes: 23 additions & 0 deletions
23
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImage.kt
This file contains hidden or 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
30 changes: 30 additions & 0 deletions
30
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenImageFormat.kt
This file contains hidden or 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
25 changes: 25 additions & 0 deletions
25
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenInlineImage.kt
This file contains hidden or 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
3 changes: 0 additions & 3 deletions
3
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/ImagenModelConfig.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.