Skip to content

Commit 7532798

Browse files
committed
Adjust format
1 parent 089c90a commit 7532798

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import com.google.firebase.vertexai.common.shared.FunctionResponse
2828
import com.google.firebase.vertexai.common.shared.FunctionResponsePart
2929
import com.google.firebase.vertexai.type.BlobPart
3030
import com.google.firebase.vertexai.type.BlockReason
31-
import com.google.firebase.vertexai.type.HarmBlockThreshold
3231
import com.google.firebase.vertexai.type.Candidate
3332
import com.google.firebase.vertexai.type.Citation
3433
import com.google.firebase.vertexai.type.CitationMetadata
@@ -40,6 +39,7 @@ import com.google.firebase.vertexai.type.FunctionCallingConfig
4039
import com.google.firebase.vertexai.type.FunctionDeclaration
4140
import com.google.firebase.vertexai.type.GenerateContentResponse
4241
import com.google.firebase.vertexai.type.GenerationConfig
42+
import com.google.firebase.vertexai.type.HarmBlockThreshold
4343
import com.google.firebase.vertexai.type.HarmCategory
4444
import com.google.firebase.vertexai.type.HarmProbability
4545
import com.google.firebase.vertexai.type.HarmSeverity
@@ -139,11 +139,14 @@ internal fun ToolConfig.toInternal() =
139139

140140
internal fun HarmBlockThreshold.toInternal() =
141141
when (this) {
142-
HarmBlockThreshold.NONE -> com.google.firebase.vertexai.common.shared.HarmBlockThreshold.BLOCK_NONE
143-
HarmBlockThreshold.ONLY_HIGH -> com.google.firebase.vertexai.common.shared.HarmBlockThreshold.BLOCK_ONLY_HIGH
144-
HarmBlockThreshold.MEDIUM_AND_ABOVE -> com.google.firebase.vertexai.common.shared.HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE
145-
HarmBlockThreshold.LOW_AND_ABOVE -> com.google.firebase.vertexai.common.shared.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE
146-
HarmBlockThreshold.UNKNOWN -> com.google.firebase.vertexai.common.shared.HarmBlockThreshold.UNSPECIFIED
142+
HarmBlockThreshold.NONE ->
143+
com.google.firebase.vertexai.common.shared.HarmBlockThreshold.BLOCK_NONE
144+
HarmBlockThreshold.ONLY_HIGH ->
145+
com.google.firebase.vertexai.common.shared.HarmBlockThreshold.BLOCK_ONLY_HIGH
146+
HarmBlockThreshold.MEDIUM_AND_ABOVE ->
147+
com.google.firebase.vertexai.common.shared.HarmBlockThreshold.BLOCK_MEDIUM_AND_ABOVE
148+
HarmBlockThreshold.LOW_AND_ABOVE ->
149+
com.google.firebase.vertexai.common.shared.HarmBlockThreshold.BLOCK_LOW_AND_ABOVE
147150
}
148151

149152
internal fun Tool.toInternal() =

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ package com.google.firebase.vertexai.type
2020
* Represents a response measuring model input.
2121
*
2222
* @property totalTokens A count of the tokens in the input
23-
* @property totalBillableCharacters A count of the characters that are billable in the input, if available.
23+
* @property totalBillableCharacters A count of the characters that are billable in the input, if
24+
* available.
2425
*/
2526
class CountTokensResponse(val totalTokens: Int, val totalBillableCharacters: Int? = null) {
2627
operator fun component1() = totalTokens

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
package com.google.firebase.vertexai.type
1818

1919
/**
20-
* A configuration for a [HarmBlockThreshold] of some [HarmCategory] allowed and blocked in responses.
20+
* A configuration for a [HarmBlockThreshold] of some [HarmCategory] allowed and blocked in
21+
* responses.
2122
*
2223
* @param harmCategory The relevant [HarmCategory].
2324
* @param threshold The threshold form harm allowable.

0 commit comments

Comments
 (0)