Conversation
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. |
📝 PRs merging into main branchOur main branch should always be in a releasable state. If you are working on a larger change, or if you don't want this change to see the light of the day just yet, consider using a feature branch first, and only merge into the main branch when the code complete and ready to be released. |
b789bfa to
ca20826
Compare
|
Why we are not using https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-deprecated/ ? |
|
We can use kotlin deprecated since it doesn't allow links.. This is exactly what we did for ktx deprecation |
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/common/Request.kt
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/common/Request.kt
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenControlConfig.kt
Outdated
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenGCSImage.kt
Outdated
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenGenerationResponse.kt
Outdated
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenGenerationResponse.kt
Outdated
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenMaskConfig.kt
Outdated
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenMaskMode.kt
Outdated
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenSubjectConfig.kt
Outdated
Show resolved
Hide resolved
ai-logic/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ImagenStyleConfig.kt
Outdated
Show resolved
Hide resolved
| val instances: List<ImagenPrompt>, | ||
| val parameters: ImagenParameters, | ||
| ) : Request { | ||
| /** |
There was a problem hiding this comment.
you can revert the whole file
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| /** Represents the control configuration for Imagen */ |
| ) | ||
| } | ||
|
|
||
| /** Represents an image response from Imagen */ |
| internal fun toPublicGCS() = ImagenGCSImage(gcsUri!!, mimeType!!) | ||
| } | ||
|
|
||
| /** Represents safety attributes for Imagen */ |
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| /** Represents the mask configuration for Imagen */ |
| */ | ||
| package com.google.firebase.ai.type | ||
|
|
||
| /** Represents the mask mode for Imagen */ |
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| /** Represents the style configuration for Imagen */ |
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| /** Represents the subject configuration for Imagen */ |
Summary
This PR marks all classes and public methods starting with
Imagenas deprecated in theai-logic/firebase-aimodule. This is in preparation for the planned shutdown of Imagen models in June 2026. Developers are encouraged to migrate to Gemini Image models.Changes Made
1. Class-Level Deprecation
Added standard deprecation notices to the KDoc of all identified
Imagen*classes and interfaces. The notice reads:Updated files:
ImagenModel.ktImagenEditMode.ktImagenEditingConfig.ktImagenImagePlacement.ktImagenPersonFilterLevel.ktImagenMaskMode.ktImagenReferenceImage.ktImagenMaskConfig.ktImagenGCSImage.ktImagenSubjectConfig.ktImagenGenerationResponse.ktImagenSubjectReferenceType.ktImagenControlType.ktImagenInlineImage.ktImagenAspectRatio.ktImagenImageFormat.ktImagenGenerationConfig.ktImagenSafetyFilterLevel.ktImagenStyleConfig.ktImagenSafetySettings.ktImagenControlConfig.ktImagenModelFutures.ktRequest.kt(Internal request classesImagenPromptandImagenParameters)2. Method-Level Deprecation
Added the notice to public methods and helper functions within those files to ensure developers are notified when using specific features:
ImagenInlineImage.kt(asBitmap,toImagenInlineImage)ImagenImagePlacement.kt(fromCoordinate)ImagenModelFutures.kt(generateImages,editImage,inpaintImage,outpaintImage,getImageModel,from)ImagenImageFormat.kt(jpeg,png)ImagenGenerationConfig.kt(Buildersetters,build,imagenGenerationConfig)ImagenReferenceImage.kt(generateMaskAndPadForOutpainting)3. Verification
./gradlew :ai-logic:firebase-ai:spotlessApply.