File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
src/main/kotlin/com/google/firebase/vertexai Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 1818* [ changed] ** Breaking Change** : Replaced sealed classes with abstract classes for ` StringFormat ` . (#6334 )
1919* [ changed] ** Breaking Change** : Refactored enum classes to be normal classes. (#6340 )
2020* [ changed] ** Breaking Change** : Marked ` GenerativeModel ` properties as private. (#6309 )
21+ * [ changed] ** Breaking Change** : Changed ` method ` parameter type to be nullable in ` SafetySettings ` . (#6379 )
2122
2223
2324# 16.0.0-beta05
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ internal fun SafetySetting.toInternal() =
100100 com.google.firebase.vertexai.common.shared.SafetySetting (
101101 harmCategory.toInternal(),
102102 threshold.toInternal(),
103- method.toInternal()
103+ method? .toInternal()
104104 )
105105
106106internal fun makeMissingCaseException (source : String , ordinal : Int ): SerializationException {
Original file line number Diff line number Diff line change @@ -22,10 +22,11 @@ package com.google.firebase.vertexai.type
2222 *
2323 * @param harmCategory The relevant [HarmCategory].
2424 * @param threshold The threshold form harm allowable.
25- * @param method Specify if the threshold is used for probability or severity score.
25+ * @param method Specify if the threshold is used for probability or severity score, if not
26+ * specified it will default to [HarmBlockMethod.PROBABILITY].
2627 */
2728public class SafetySetting (
2829 internal val harmCategory : HarmCategory ,
2930 internal val threshold : HarmBlockThreshold ,
30- internal val method : HarmBlockMethod = HarmBlockMethod . PROBABILITY
31+ internal val method : HarmBlockMethod ? = null ,
3132)
You can’t perform that action at this time.
0 commit comments