Skip to content

Commit 1c5d1a7

Browse files
committed
Revert "Strip redundant serial names"
This reverts commit c75b68e.
1 parent b748629 commit 1c5d1a7

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@ internal constructor(
4949
}
5050

5151
@Serializable
52-
internal data class Internal(val mode: Mode, val allowedFunctionNames: List<String>? = null) {
52+
internal data class Internal(
53+
val mode: Mode,
54+
@SerialName("allowed_function_names") val allowedFunctionNames: List<String>? = null
55+
) {
5356
@Serializable
5457
enum class Mode {
5558
@SerialName("MODE_UNSPECIFIED") UNSPECIFIED,

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,15 @@ private constructor(
161161
@Serializable
162162
internal data class Internal(
163163
val temperature: Float?,
164-
val topP: Float?,
165-
val topK: Int?,
166-
val candidateCount: Int?,
167-
val maxOutputTokens: Int?,
168-
val stopSequences: List<String>?,
169-
val responseMimeType: String? = null,
170-
val presencePenalty: Float? = null,
171-
val frequencyPenalty: Float? = null,
172-
val responseSchema: Schema.Internal? = null,
164+
@SerialName("top_p") val topP: Float?,
165+
@SerialName("top_k") val topK: Int?,
166+
@SerialName("candidate_count") val candidateCount: Int?,
167+
@SerialName("max_output_tokens") val maxOutputTokens: Int?,
168+
@SerialName("stop_sequences") val stopSequences: List<String>?,
169+
@SerialName("response_mime_type") val responseMimeType: String? = null,
170+
@SerialName("presence_penalty") val presencePenalty: Float? = null,
171+
@SerialName("frequency_penalty") val frequencyPenalty: Float? = null,
172+
@SerialName("response_schema") val responseSchema: Schema.Internal? = null,
173173
)
174174

175175
public companion object {

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package com.google.firebase.vertexai.type
1818

19+
import kotlinx.serialization.SerialName
1920
import kotlinx.serialization.Serializable
2021

2122
/**
@@ -41,5 +42,8 @@ public class ToolConfig(internal val functionCallingConfig: FunctionCallingConfi
4142
)
4243

4344
@Serializable
44-
internal data class Internal(val functionCallingConfig: FunctionCallingConfig.Internal?)
45+
internal data class Internal(
46+
@SerialName("function_calling_config")
47+
val functionCallingConfig: FunctionCallingConfig.Internal?
48+
)
4549
}

0 commit comments

Comments
 (0)