Skip to content

Commit a9d1dc0

Browse files
authored
Merge branch 'main' into daymon-fix-release-notes
2 parents 25fe73c + dd23959 commit a9d1dc0

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

firebase-vertexai/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
* [changed] **Breaking Change**: Replaced sealed classes with abstract classes for `StringFormat`. (#6334)
3333
* [changed] **Breaking Change**: Refactored enum classes to be normal classes. (#6340)
3434
* [changed] **Breaking Change**: Marked `GenerativeModel` properties as private. (#6309)
35+
* [changed] **Breaking Change**: Changed `method` parameter type to be nullable in `SafetySettings`. (#6379)
3536

3637

3738
# 16.0.0-beta05

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/internal/util/conversions.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

106106
internal fun makeMissingCaseException(source: String, ordinal: Int): SerializationException {

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/SafetySetting.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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
*/
2728
public 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
)

0 commit comments

Comments
 (0)