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 18
18
* [ changed] ** Breaking Change** : Replaced sealed classes with abstract classes for ` StringFormat ` . (#6334 )
19
19
* [ changed] ** Breaking Change** : Refactored enum classes to be normal classes. (#6340 )
20
20
* [ changed] ** Breaking Change** : Marked ` GenerativeModel ` properties as private. (#6309 )
21
+ * [ changed] ** Breaking Change** : Changed ` method ` parameter type to be nullable in ` SafetySettings ` . (#6379 )
21
22
22
23
23
24
# 16.0.0-beta05
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ internal fun SafetySetting.toInternal() =
100
100
com.google.firebase.vertexai.common.shared.SafetySetting (
101
101
harmCategory.toInternal(),
102
102
threshold.toInternal(),
103
- method.toInternal()
103
+ method? .toInternal()
104
104
)
105
105
106
106
internal 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
22
22
*
23
23
* @param harmCategory The relevant [HarmCategory].
24
24
* @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].
26
27
*/
27
28
public class SafetySetting (
28
29
internal val harmCategory : HarmCategory ,
29
30
internal val threshold : HarmBlockThreshold ,
30
- internal val method : HarmBlockMethod = HarmBlockMethod . PROBABILITY
31
+ internal val method : HarmBlockMethod ? = null ,
31
32
)
You can’t perform that action at this time.
0 commit comments