File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
src/main/java/com/google/genai Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1581,6 +1581,13 @@ ObjectNode GenerateImagesConfigToMldev(
15811581 Common .getValueByPath (fromObject , new String [] {"aspectRatio" }));
15821582 }
15831583
1584+ if (Common .getValueByPath (fromObject , new String [] {"enhancePrompt" }) != null ) {
1585+ Common .setValueByPath (
1586+ parentObject ,
1587+ new String [] {"parameters" , "enhancePrompt" },
1588+ Common .getValueByPath (fromObject , new String [] {"enhancePrompt" }));
1589+ }
1590+
15841591 return toObject ;
15851592 }
15861593
@@ -1686,6 +1693,13 @@ ObjectNode GenerateImagesConfigToVertex(
16861693 Common .getValueByPath (fromObject , new String [] {"aspectRatio" }));
16871694 }
16881695
1696+ if (Common .getValueByPath (fromObject , new String [] {"enhancePrompt" }) != null ) {
1697+ Common .setValueByPath (
1698+ parentObject ,
1699+ new String [] {"parameters" , "enhancePrompt" },
1700+ Common .getValueByPath (fromObject , new String [] {"enhancePrompt" }));
1701+ }
1702+
16891703 return toObject ;
16901704 }
16911705
Original file line number Diff line number Diff line change @@ -62,6 +62,9 @@ public abstract class GenerateImagesConfig extends JsonSerializable {
6262 /** Aspect ratio of the generated images. */
6363 public abstract Optional <String > getAspectRatio ();
6464
65+ /** Whether to use the prompt rewriting logic. */
66+ public abstract Optional <Boolean > getEnhancePrompt ();
67+
6568 /** Instantiates a builder for GenerateImagesConfig. */
6669 public static Builder builder () {
6770 return new AutoValue_GenerateImagesConfig .Builder ();
@@ -115,6 +118,9 @@ public abstract static class Builder {
115118 @ JsonProperty ("aspectRatio" )
116119 public abstract Builder setAspectRatio (String aspectRatio );
117120
121+ @ JsonProperty ("enhancePrompt" )
122+ public abstract Builder setEnhancePrompt (boolean enhancePrompt );
123+
118124 public abstract GenerateImagesConfig build ();
119125 }
120126
You can’t perform that action at this time.
0 commit comments