|
24 | 24 | import com.google.auto.value.AutoValue; |
25 | 25 | import com.google.errorprone.annotations.CanIgnoreReturnValue; |
26 | 26 | import com.google.genai.JsonSerializable; |
| 27 | +import java.util.Map; |
27 | 28 | import java.util.Optional; |
28 | 29 |
|
29 | 30 | /** Supervised fine-tuning job creation request - optional fields. */ |
@@ -89,6 +90,16 @@ public abstract class CreateTuningJobConfig extends JsonSerializable { |
89 | 90 | @JsonProperty("learningRate") |
90 | 91 | public abstract Optional<Float> learningRate(); |
91 | 92 |
|
| 93 | + /** |
| 94 | + * Optional. The labels with user-defined metadata to organize TuningJob and generated resources |
| 95 | + * such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode |
| 96 | + * codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. |
| 97 | + * International characters are allowed. See https://goo.gl/xmQnxf for more information and |
| 98 | + * examples of labels. |
| 99 | + */ |
| 100 | + @JsonProperty("labels") |
| 101 | + public abstract Optional<Map<String, String>> labels(); |
| 102 | + |
92 | 103 | /** Instantiates a builder for CreateTuningJobConfig. */ |
93 | 104 | @ExcludeFromGeneratedCoverageReport |
94 | 105 | public static Builder builder() { |
@@ -242,6 +253,18 @@ public Builder adapterSize(String adapterSize) { |
242 | 253 | @JsonProperty("learningRate") |
243 | 254 | public abstract Builder learningRate(Float learningRate); |
244 | 255 |
|
| 256 | + /** |
| 257 | + * Setter for labels. |
| 258 | + * |
| 259 | + * <p>labels: Optional. The labels with user-defined metadata to organize TuningJob and |
| 260 | + * generated resources such as Model and Endpoint. Label keys and values can be no longer than |
| 261 | + * 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, |
| 262 | + * underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for |
| 263 | + * more information and examples of labels. |
| 264 | + */ |
| 265 | + @JsonProperty("labels") |
| 266 | + public abstract Builder labels(Map<String, String> labels); |
| 267 | + |
245 | 268 | public abstract CreateTuningJobConfig build(); |
246 | 269 | } |
247 | 270 |
|
|
0 commit comments