Skip to content

Commit 0391a9e

Browse files
authored
Merge branch 'main' into dependabot/pip/ci/fireci/protobuf-4.25.8
2 parents f156960 + a2409b4 commit 0391a9e

File tree

30 files changed

+859
-61
lines changed

30 files changed

+859
-61
lines changed

.github/workflows/dataconnect.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ on:
1313
pull_request:
1414
paths:
1515
- .github/workflows/dataconnect.yml
16+
- gradlew
17+
- build.gradle.kts
18+
- gradle.properties
19+
- gradlew.bat
20+
- settings.gradle.kts
21+
- subprojects.cfg
22+
- 'gradle/**'
23+
- 'plugins/**'
24+
- '!plugins/**/*.md'
1625
- 'firebase-dataconnect/**'
1726
- '!firebase-dataconnect/demo/**'
1827
- '!firebase-dataconnect/scripts/**'

.github/workflows/dataconnect_demo_app.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,19 @@ jobs:
106106
set -x
107107
firebase-dataconnect/demo/gradlew \
108108
--project-dir firebase-dataconnect/demo \
109-
--no-daemon \
110109
${{ (inputs.gradleInfoLog && '--info') || '' }} \
111110
--profile \
112-
-PdataConnect.minimalApp.firebaseCommand=${{ env.FDC_FIREBASE_COMMAND }} \
111+
-PdataConnect.demo.firebaseCommand=${{ env.FDC_FIREBASE_COMMAND }} \
113112
assemble test
114113
114+
- name: gradle dokkaGeneratePublicationHtml
115+
run: |
116+
set -x
117+
firebase-dataconnect/demo/gradlew \
118+
--project-dir firebase-dataconnect/demo \
119+
${{ (inputs.gradleInfoLog && '--info') || '' }} \
120+
dokkaGeneratePublicationHtml
121+
115122
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
116123
with:
117124
name: apks
@@ -126,6 +133,13 @@ jobs:
126133
if-no-files-found: warn
127134
compression-level: 9
128135

136+
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
137+
with:
138+
name: ktdoc
139+
path: firebase-dataconnect/demo/build/dokka/html
140+
if-no-files-found: warn
141+
compression-level: 9
142+
129143
spotlessCheck:
130144
continue-on-error: false
131145
runs-on: ubuntu-latest

.github/workflows/sessions-e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: set up JDK 17
2424
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
2525
with:
26-
java-version: '11'
26+
java-version: '17'
2727
distribution: 'temurin'
2828
cache: gradle
2929

@@ -39,4 +39,4 @@ jobs:
3939
env:
4040
FTL_RESULTS_BUCKET: fireescape
4141
run: |
42-
./gradlew :firebase-sessions:test-app:deviceCheck withErrorProne -PtargetBackend="prod" -PtriggerCrashes
42+
./gradlew :firebase-sessions:test-app:deviceCheck withErrorProne -PtargetBackend="prod"

ci/fireci/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dependencies = [
1414
"pandas==1.5.3",
1515
"PyGithub==1.58.2",
1616
"pystache==0.6.0",
17-
"requests==2.32.2",
17+
"requests==2.32.4",
1818
"seaborn==0.12.2",
1919
"PyYAML==6.0.1",
2020
"termcolor==2.4.0",

firebase-ai/CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Unreleased
2-
2+
* [changed] Deprecate the `totalBillableCharacters` field (only usable with pre-2.0 models). (#7042)
3+
* [feature] Added support for extra schema properties like `title`, `minItems`, `maxItems`, `minimum`
4+
and `maximum`. As well as support for the `anyOf` schema. (#7013)
35

46
# 16.1.0
57
* [fixed] Fixed `FirebaseAI.getInstance` StackOverflowException (#6971)
@@ -8,8 +10,7 @@
810
* [changed] **Breaking Change**: Updated `SpeechConfig` to take in `Voice` class instead of `Voices` class.
911
* **Action Required:** Update all references of `SpeechConfig` initialization to use `Voice` class.
1012
* [fixed] Fix incorrect model name in count token requests to the developer API backend
11-
* [feature] Added support for extra schema properties like `title`, `minItems`, `maxItems`, `minimum`
12-
and `maximum`. As well as support for the `anyOf` schema.
13+
1314

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

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

firebase-ai/api.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,15 +245,15 @@ package com.google.firebase.ai.type {
245245
}
246246

247247
public final class CountTokensResponse {
248-
ctor public CountTokensResponse(int totalTokens, Integer? totalBillableCharacters = null, java.util.List<com.google.firebase.ai.type.ModalityTokenCount> promptTokensDetails = emptyList());
248+
ctor public CountTokensResponse(int totalTokens, @Deprecated Integer? totalBillableCharacters = null, java.util.List<com.google.firebase.ai.type.ModalityTokenCount> promptTokensDetails = emptyList());
249249
method public operator int component1();
250250
method public operator Integer? component2();
251251
method public operator java.util.List<com.google.firebase.ai.type.ModalityTokenCount>? component3();
252252
method public java.util.List<com.google.firebase.ai.type.ModalityTokenCount> getPromptTokensDetails();
253-
method public Integer? getTotalBillableCharacters();
253+
method @Deprecated public Integer? getTotalBillableCharacters();
254254
method public int getTotalTokens();
255255
property public final java.util.List<com.google.firebase.ai.type.ModalityTokenCount> promptTokensDetails;
256-
property public final Integer? totalBillableCharacters;
256+
property @Deprecated public final Integer? totalBillableCharacters;
257257
property public final int totalTokens;
258258
}
259259

firebase-ai/firebase-ai.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ firebaseLibrary {
2828
testLab.enabled = false
2929
publishJavadoc = true
3030
releaseNotes {
31-
name.set("{{firebase_ai}}")
31+
name.set("{{firebase_ai_logic}}")
3232
versionName.set("ai")
3333
hasKTX.set(false)
3434
}
@@ -67,7 +67,10 @@ android {
6767
targetSdk = targetSdkVersion
6868
baseline = file("lint-baseline.xml")
6969
}
70-
sourceSets { getByName("test").java.srcDirs("src/testUtil") }
70+
sourceSets {
71+
// getByName("test").java.srcDirs("src/testUtil")
72+
getByName("androidTest") { kotlin.srcDirs("src/testUtil") }
73+
}
7174
}
7275

7376
// Enable Kotlin "Explicit API Mode". This causes the Kotlin compiler to fail if any
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
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+
package com.google.firebase.ai
17+
18+
import androidx.test.platform.app.InstrumentationRegistry
19+
import com.google.firebase.FirebaseApp
20+
import com.google.firebase.FirebaseOptions
21+
import com.google.firebase.ai.type.GenerativeBackend
22+
23+
class AIModels {
24+
25+
companion object {
26+
private val API_KEY: String = ""
27+
private val APP_ID: String = ""
28+
private val PROJECT_ID: String = "fireescape-integ-tests"
29+
// General purpose models
30+
var app: FirebaseApp? = null
31+
var flash2Model: GenerativeModel? = null
32+
var flash2LiteModel: GenerativeModel? = null
33+
34+
/** Returns a list of general purpose models to test */
35+
fun getModels(): List<GenerativeModel> {
36+
if (flash2Model == null) {
37+
setup()
38+
}
39+
return listOf(flash2Model!!, flash2LiteModel!!)
40+
}
41+
42+
fun app(): FirebaseApp {
43+
if (app == null) {
44+
setup()
45+
}
46+
return app!!
47+
}
48+
49+
fun setup() {
50+
val context = InstrumentationRegistry.getInstrumentation().context
51+
app =
52+
FirebaseApp.initializeApp(
53+
context,
54+
FirebaseOptions.Builder()
55+
.setApiKey(API_KEY)
56+
.setApplicationId(APP_ID)
57+
.setProjectId(PROJECT_ID)
58+
.build()
59+
)
60+
flash2Model =
61+
FirebaseAI.getInstance(app!!, GenerativeBackend.vertexAI())
62+
.generativeModel(
63+
modelName = "gemini-2.0-flash",
64+
)
65+
flash2LiteModel =
66+
FirebaseAI.getInstance(app!!, GenerativeBackend.vertexAI())
67+
.generativeModel(
68+
modelName = "gemini-2.0-flash-lite",
69+
)
70+
}
71+
}
72+
}

0 commit comments

Comments
 (0)