Skip to content

Commit bdb330e

Browse files
authored
Add GenerationConfig to CountTokenRequest's (#6768)
For reference b/402856353
1 parent 17c302e commit bdb330e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

firebase-vertexai/CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unreleased
2-
2+
* [feature] `CountTokenRequest` now includes `GenerationConfig` from the model.
33

44
# 16.2.0
55
* [fixed] Added support for new values sent by the server for `FinishReason` and `BlockReason`.
@@ -69,4 +69,3 @@
6969
* [feature] Added support for `responseMimeType` in `GenerationConfig`.
7070
* [changed] Renamed `GoogleGenerativeAIException` to `FirebaseVertexAIException`.
7171
* [changed] Updated the KDocs for various classes and functions.
72-

firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/common/Request.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ internal data class CountTokensRequest(
4949
val contents: List<Content.Internal>? = null,
5050
val tools: List<Tool.Internal>? = null,
5151
@SerialName("system_instruction") val systemInstruction: Content.Internal? = null,
52+
val generationConfig: GenerationConfig.Internal? = null
5253
) : Request {
5354
companion object {
5455

@@ -58,6 +59,7 @@ internal data class CountTokensRequest(
5859
contents = generateContentRequest.contents,
5960
tools = generateContentRequest.tools,
6061
systemInstruction = generateContentRequest.systemInstruction,
62+
generationConfig = generateContentRequest.generationConfig,
6163
)
6264
}
6365
}

0 commit comments

Comments
 (0)