Skip to content

Commit c6afacd

Browse files
[Ai] Deprecate totalBillableCharacters (#7042)
I've marked the `totalBillableCharacters` field in `CountTokensResponse.kt` as deprecated. This includes adding the `@Deprecated` annotation and a corresponding KDoc `@deprecated` tag. The field is planned to be removed in a future version of the SDK. --------- Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent f08e0c7 commit c6afacd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

firebase-ai/CHANGELOG.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Unreleased
2-
2+
* [changed] Deprecate the `totalBillableCharacters` field (only usable with pre-2.0 models). (#7042)
33

44
# 16.1.0
55
* [fixed] Fixed `FirebaseAI.getInstance` StackOverflowException (#6971)
@@ -9,7 +9,7 @@
99
* **Action Required:** Update all references of `SpeechConfig` initialization to use `Voice` class.
1010
* [fixed] Fix incorrect model name in count token requests to the developer API backend
1111
* [feature] Added support for extra schema properties like `title`, `minItems`, `maxItems`, `minimum`
12-
and `maximum`. As well as support for the `anyOf` schema.
12+
and `maximum`. As well as support for the `anyOf` schema.
1313

1414
# 16.0.0
1515
* [feature] Initial release of the Firebase AI SDK (`firebase-ai`). This SDK *replaces* the previous
@@ -28,4 +28,3 @@
2828

2929
Note: This feature is in Public Preview, which means that it is not subject to any SLA or
3030
deprecation policy and could change in backwards-incompatible ways.
31-

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import kotlinx.serialization.Serializable
3535
*/
3636
public class CountTokensResponse(
3737
public val totalTokens: Int,
38+
@Deprecated("This field is deprecated and will be removed in a future version.")
3839
public val totalBillableCharacters: Int? = null,
3940
public val promptTokensDetails: List<ModalityTokenCount> = emptyList(),
4041
) {

0 commit comments

Comments
 (0)