Skip to content

Commit 5167345

Browse files
authored
Merge branch 'main' into ep/ai-stack-overflow
2 parents ad7f629 + 9c00477 commit 5167345

File tree

12 files changed

+169
-44
lines changed

12 files changed

+169
-44
lines changed

firebase-ai/CHANGELOG.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
# Unreleased
2+
23
* [fixed] Fixed `FirebaseAI.getInstance` StackOverflowException (#6971)
3-
* [fixed] **Breaking Change**: Fixed missing builder methods and return types in builders.
4-
* [changed] **Breaking Change**: `LiveModelFutures.connect` now returns `ListenableFuture<LiveSessionFutures>` instead of `ListenableFuture<LiveSession>`.
5-
* **Action Required:** Remove any transformations from LiveSession object to LiveSessionFutures object.
6-
* **Action Required:** Change type of variable handling `LiveModelFutures.connect` to `ListenableFuture<LiveSessionsFutures>`
7-
* [changed] **Breaking Change**: Removed `UNSPECIFIED` value for enum class `ResponseModality`
8-
* **Action Required:** Remove all references to `ResponseModality.UNSPECIFIED`
9-
* [changed] **Breaking Change**: Renamed `LiveGenerationConfig.setResponseModalities` to `LiveGenerationConfig.setResponseModality`
10-
* **Action Required:** Replace all references of `LiveGenerationConfig.setResponseModalities` with `LiveGenerationConfig.setResponseModality`
11-
* [feature] Added support for `HarmBlockThreshold.OFF`. See the
12-
[model documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-filters#how_to_configure_content_filters){: .external}
13-
for more information.
14-
* [fixed] Improved thread usage when using a `LiveGenerativeModel`. (#6870)
15-
* [fixed] Fixed an issue with `LiveContentResponse` audio data not being present when the model was
16-
interrupted or the turn completed. (#6870)
17-
* [fixed] Fixed an issue with `LiveSession` not converting exceptions to `FirebaseVertexAIException`. (#6870)
18-
* * [changed] **Breaking Change**: Removed the `LiveContentResponse.Status` class, and instead have nested the status
19-
fields as properties of `LiveContentResponse`. (#6906)
20-
* [changed] **Breaking Change**: Removed the `LiveContentResponse` class, and instead have provided subclasses
21-
of `LiveServerMessage` that match the responses from the model. (#6910)
22-
* [feature] Added support for the `id` field on `FunctionResponsePart` and `FunctionCallPart`. (#6910)
23-
* [feature] Add support for specifying response modalities in `GenerationConfig`. (#6921)
24-
* [feature] Added a helper field for getting all the `InlineDataPart` from a `GenerateContentResponse`. (#6922)
4+
* [fixed] Fixed an issue that was causing the SDK to send empty `FunctionDeclaration` descriptions to the API.
5+
6+
# 16.0.0
7+
* [feature] Initial release of the Firebase AI SDK (`firebase-ai`). This SDK *replaces* the previous
8+
Vertex AI in Firebase SDK (`firebase-vertexai`) to accommodate the evolving set of supported
9+
features and services.
10+
* The new Firebase AI SDK provides **Preview** support for the Gemini Developer API, including its
11+
free tier offering.
12+
* Using the Firebase AI SDK with the Vertex AI Gemini API is still generally available (GA).
13+
14+
If you're using the old `firebase-vertexai`, we recommend
15+
[migrating to `firebase-ai`](/docs/ai-logic/migrate-to-latest-sdk)
16+
because all new development and features will be in this new SDK.
17+
* [feature] **Preview:** Added support for specifying response modalities in `GenerationConfig`
18+
(only available in the new `firebase-ai` package). This includes support for image generation using
19+
[specific Gemini models](/docs/vertex-ai/models).
20+
21+
Note: This feature is in Public Preview, which means that it is not subject to any SLA or
22+
deprecation policy and could change in backwards-incompatible ways.
2523

firebase-ai/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
version=16.0.0
16-
latestReleasedVersion=
15+
version=16.0.1
16+
latestReleasedVersion=16.0.0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public class FunctionDeclaration(
6161
internal val schema: Schema =
6262
Schema.obj(properties = parameters, optionalProperties = optionalParameters, nullable = false)
6363

64-
internal fun toInternal() = Internal(name, "", schema.toInternal())
64+
internal fun toInternal() = Internal(name, description, schema.toInternal())
6565

6666
@Serializable
6767
internal data class Internal(
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
/*
2+
* Copyright 2025 Google LLC
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.google.firebase.ai.type
18+
19+
import io.kotest.assertions.json.shouldEqualJson
20+
import kotlinx.serialization.encodeToString
21+
import kotlinx.serialization.json.Json
22+
import org.junit.Test
23+
24+
internal class FunctionDeclarationTest {
25+
26+
@Test
27+
fun `Basic FunctionDeclaration with name, description and parameters`() {
28+
val functionDeclaration =
29+
FunctionDeclaration(
30+
name = "isUserAGoat",
31+
description = "Determine if the user is subject to teleportations.",
32+
parameters = mapOf("userID" to Schema.string("ID of the User making the call"))
33+
)
34+
35+
val expectedJson =
36+
"""
37+
{
38+
"name": "isUserAGoat",
39+
"description": "Determine if the user is subject to teleportations.",
40+
"parameters": {
41+
"type": "OBJECT",
42+
"properties": {
43+
"userID": {
44+
"type": "STRING",
45+
"description": "ID of the User making the call"
46+
}
47+
},
48+
"required": [
49+
"userID"
50+
]
51+
}
52+
}
53+
"""
54+
.trimIndent()
55+
56+
Json.encodeToString(functionDeclaration.toInternal()).shouldEqualJson(expectedJson)
57+
}
58+
59+
@Test
60+
fun `FunctionDeclaration with optional parameters`() {
61+
val functionDeclaration =
62+
FunctionDeclaration(
63+
name = "isUserAGoat",
64+
description = "Determine if the user is subject to teleportations.",
65+
parameters =
66+
mapOf(
67+
"userID" to Schema.string("ID of the user making the call"),
68+
"userName" to Schema.string("Name of the user making the call")
69+
),
70+
optionalParameters = listOf("userName")
71+
)
72+
73+
val expectedJson =
74+
"""
75+
{
76+
"name": "isUserAGoat",
77+
"description": "Determine if the user is subject to teleportations.",
78+
"parameters": {
79+
"type": "OBJECT",
80+
"properties": {
81+
"userID": {
82+
"type": "STRING",
83+
"description": "ID of the user making the call"
84+
},
85+
"userName": {
86+
"type": "STRING",
87+
"description": "Name of the user making the call"
88+
}
89+
},
90+
"required": [
91+
"userID"
92+
]
93+
}
94+
}
95+
"""
96+
.trimIndent()
97+
98+
Json.encodeToString(functionDeclaration.toInternal()).shouldEqualJson(expectedJson)
99+
}
100+
}

firebase-config/CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Unreleased
2-
* [fixed] Fixed `NetworkOnMainThreadException` on Android versions below 8 by disconnecting HttpURLConnection only on API levels 26 and higher.
2+
3+
4+
# 22.1.2
5+
* [fixed] Fixed `NetworkOnMainThreadException` on Android versions below 8 by disconnecting
6+
`HttpURLConnection` only on API levels 26 and higher. GitHub Issue [#6934]
7+
8+
9+
## Kotlin
10+
The Kotlin extensions library transitively includes the updated
11+
`firebase-config` library. The Kotlin extensions library has no additional
12+
updates.
313

414
# 22.1.1
515
* [fixed] Fixed an issue where the connection to the real-time Remote Config backend could remain

firebase-config/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515
#
1616

17-
version=22.1.2
18-
latestReleasedVersion=22.1.1
17+
version=22.1.3
18+
latestReleasedVersion=22.1.2
1919
android.enableUnitTestBinaryResources=true
2020

firebase-dataconnect/CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Unreleased
2-
* [changed] Code robustness improvements related to state management in
2+
3+
4+
# 16.0.2
5+
* [changed] Improved code robustness related to state management in
36
`FirebaseDataConnect` objects.
47
([#6861](https://github.com/firebase/firebase-android-sdk/pull/6861))
58

6-
79
# 16.0.1
810
* [changed] Internal improvements.
911

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
version=16.0.2
2-
latestReleasedVersion=16.0.1
1+
version=16.0.3
2+
latestReleasedVersion=16.0.2

firebase-storage/CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Unreleased
2-
* [fixed] Fixed an issue where tests were depending on a deprecated feature of the test framework (#6927)
2+
3+
4+
# 21.0.2
5+
* [fixed] Fixed an issue where tests were depending on a deprecated feature of the test framework. (#6927)
6+
7+
8+
## Kotlin
9+
The Kotlin extensions library transitively includes the updated
10+
`firebase-storage` library. The Kotlin extensions library has no additional
11+
updates.
312

413
# 21.0.1
514
* [fixed] Fixed an issue where `maxUploadRetryTimeMillis` parameter is ignored when uploading using
@@ -8,6 +17,7 @@
817
# 21.0.0
918
* [changed] Bump internal dependencies
1019

20+
1121
## Kotlin
1222
The Kotlin extensions library transitively includes the updated
1323
`firebase-storage` library. The Kotlin extensions library has no additional

firebase-storage/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
version=21.0.2
16-
latestReleasedVersion=21.0.1
15+
version=21.0.3
16+
latestReleasedVersion=21.0.2
1717
android.enableUnitTestBinaryResources=true

firebase-vertexai/CHANGELOG.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
# Unreleased
2-
* [changed] **Renamed / Replaced:** Vertex AI in Firebase (`FirebaseVertexAI`) has been renamed and
3-
replaced by the new Firebase AI SDK: `FirebaseAI`. This is to accommodate the evolving set of
4-
supported features and services. Please migrate to the new `FirebaseAI` package. See details in the
5-
[migration guide](/docs/vertex-ai/migrate-to-latest-sdk).
62

7-
Note: Existing Vertex AI in Firebase users may continue to use the SDK and receive bug fixes but,
8-
going forward, new features will only be added into the new Firebase AI SDK.
3+
4+
# 16.5.0
5+
* [changed] **Renamed / Replaced:** Vertex AI in Firebase (`firebase-vertexai`) has been renamed and
6+
replaced by the new Firebase AI SDK: `firebase-ai`. This is to accommodate the evolving set of
7+
supported features and services. Please [**migrate to the new `firebase-ai` package**](/docs/vertex-ai/migrate-to-latest-sdk).
8+
9+
Note: Existing users of the Vertex AI in Firebase SDK (`firebase-vertexai`) may continue to use the
10+
SDK and receive bug fixes but, going forward, new features will only be added into the new Firebase
11+
AI SDK.
12+
13+
The following changes and features are in the Vertex AI in Firebase SDK (`firebase-vertexai`), but
14+
we recommend that you accommodate them (as applicable) as part of migrating to the `firebase-ai` SDK.
915
* [changed] **Breaking Change**: Removed the `LiveContentResponse.Status` class, and instead have nested the status
1016
fields as properties of `LiveContentResponse`. (#6941)
1117
* [changed] **Breaking Change**: Removed the `LiveContentResponse` class, and instead have provided subclasses
1218
of `LiveServerMessage` that match the responses from the model. (#6941)
1319
* [feature] Added support for the `id` field on `FunctionResponsePart` and `FunctionCallPart`. (#6941)
1420
* [feature] Added a helper field for getting all the `InlineDataPart` from a `GenerateContentResponse`. (#6941)
1521

16-
1722
# 16.4.0
1823
* [changed] **Breaking Change**: `LiveModelFutures.connect` now returns `ListenableFuture<LiveSessionFutures>` instead of `ListenableFuture<LiveSession>`.
1924
* **Action Required:** Remove any transformations from LiveSession object to LiveSessionFutures object.

firebase-vertexai/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
version=16.4.1
16-
latestReleasedVersion=16.4.0
15+
version=16.5.1
16+
latestReleasedVersion=16.5.0

0 commit comments

Comments
 (0)