File tree Expand file tree Collapse file tree 4 files changed +10
-1
lines changed
src/main/kotlin/com/google/firebase/vertexai Expand file tree Collapse file tree 4 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
# Unreleased
2
+ * [ changed] Added support for Civic Integrity in Harm Category. (#6502 )
2
3
* [ fixed] Improved error message when using an invalid location. (#6428 )
3
4
* [ fixed] Fixed issue where Firebase App Check error tokens were unintentionally missing from the requests. (#6409 )
4
5
* [ fixed] Clarified in the documentation that ` Schema.integer ` and ` Schema.float ` only provide hints to the model. (#6420 )
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ internal enum class HarmCategory {
38
38
@SerialName(" HARM_CATEGORY_HARASSMENT" ) HARASSMENT ,
39
39
@SerialName(" HARM_CATEGORY_HATE_SPEECH" ) HATE_SPEECH ,
40
40
@SerialName(" HARM_CATEGORY_SEXUALLY_EXPLICIT" ) SEXUALLY_EXPLICIT ,
41
- @SerialName(" HARM_CATEGORY_DANGEROUS_CONTENT" ) DANGEROUS_CONTENT
41
+ @SerialName(" HARM_CATEGORY_DANGEROUS_CONTENT" ) DANGEROUS_CONTENT ,
42
+ @SerialName(" HARM_CATEGORY_CIVIC_INTEGRITY" ) CIVIC_INTEGRITY ,
42
43
}
43
44
44
45
internal typealias Base64 = String
Original file line number Diff line number Diff line change @@ -137,6 +137,8 @@ internal fun HarmCategory.toInternal() =
137
137
com.google.firebase.vertexai.common.shared.HarmCategory .SEXUALLY_EXPLICIT
138
138
HarmCategory .DANGEROUS_CONTENT ->
139
139
com.google.firebase.vertexai.common.shared.HarmCategory .DANGEROUS_CONTENT
140
+ HarmCategory .CIVIC_INTEGRITY ->
141
+ com.google.firebase.vertexai.common.shared.HarmCategory .CIVIC_INTEGRITY
140
142
HarmCategory .UNKNOWN -> com.google.firebase.vertexai.common.shared.HarmCategory .UNKNOWN
141
143
else -> throw makeMissingCaseException(" HarmCategory" , ordinal)
142
144
}
@@ -315,6 +317,8 @@ internal fun com.google.firebase.vertexai.common.shared.HarmCategory.toPublic()
315
317
HarmCategory .SEXUALLY_EXPLICIT
316
318
com.google.firebase.vertexai.common.shared.HarmCategory .DANGEROUS_CONTENT ->
317
319
HarmCategory .DANGEROUS_CONTENT
320
+ com.google.firebase.vertexai.common.shared.HarmCategory .CIVIC_INTEGRITY ->
321
+ HarmCategory .CIVIC_INTEGRITY
318
322
else -> HarmCategory .UNKNOWN
319
323
}
320
324
Original file line number Diff line number Diff line change @@ -33,5 +33,8 @@ public class HarmCategory private constructor(public val ordinal: Int) {
33
33
34
34
/* * Dangerous content. */
35
35
@JvmField public val DANGEROUS_CONTENT : HarmCategory = HarmCategory (4 )
36
+
37
+ /* * Content that may be used to harm civic integrity. */
38
+ @JvmField public val CIVIC_INTEGRITY : HarmCategory = HarmCategory (5 )
36
39
}
37
40
}
You can’t perform that action at this time.
0 commit comments