Skip to content

Commit d6355ae

Browse files
authored
Merge branch 'main' into dconeybe/dataconnect/CiParseErrorsFromLogcat
2 parents f1ec66c + 4c4c7c9 commit d6355ae

File tree

126 files changed

+11705
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+11705
-104
lines changed

.github/workflows/check-vertexai-responses.yml renamed to .github/workflows/check-firebaseai-responses.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Check Vertex AI Responses
1+
name: Check Firebase AI Responses
22

33
on: pull_request
44

@@ -10,30 +10,30 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1212
- name: Clone mock responses
13-
run: firebase-vertexai/update_responses.sh
13+
run: firebase-ai/update_responses.sh
1414
- name: Find cloned and latest versions
1515
run: |
1616
CLONED=$(git describe --tags)
1717
LATEST=$(git tag --sort=v:refname | tail -n1)
1818
echo "cloned_tag=$CLONED" >> $GITHUB_ENV
1919
echo "latest_tag=$LATEST" >> $GITHUB_ENV
20-
working-directory: firebase-vertexai/src/test/resources/vertexai-sdk-test-data
20+
working-directory: firebase-ai/src/test/resources/vertexai-sdk-test-data
2121
- name: Find comment from previous run if exists
2222
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
2323
id: fc
2424
with:
2525
issue-number: ${{github.event.number}}
26-
body-includes: Vertex AI Mock Responses Check
26+
body-includes: Firebase AI Mock Responses Check
2727
- name: Comment on PR if newer version is available
2828
if: ${{env.cloned_tag != env.latest_tag && !steps.fc.outputs.comment-id}}
2929
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
3030
with:
3131
issue-number: ${{github.event.number}}
3232
body: >
33-
### Vertex AI Mock Responses Check :warning:
33+
### Firebase AI Mock Responses Check :warning:
3434
35-
A newer major version of the mock responses for Vertex AI unit tests is available.
36-
[update_responses.sh](https://github.com/firebase/firebase-android-sdk/blob/main/firebase-vertexai/update_responses.sh)
35+
A newer major version of the mock responses for Firebase AI unit tests is available.
36+
[update_responses.sh](https://github.com/firebase/firebase-android-sdk/blob/main/firebase-ai/update_responses.sh)
3737
should be updated to clone the latest version of the responses: `${{env.latest_tag}}`
3838
- name: Delete comment when version gets updated
3939
if: ${{env.cloned_tag == env.latest_tag && steps.fc.outputs.comment-id}}

.github/workflows/ci_tests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ jobs:
5656
distribution: temurin
5757
cache: gradle
5858

59-
- name: Clone mock responses
59+
- name: Clone vertexai mock responses
6060
if: matrix.module == ':firebase-vertexai'
6161
run: firebase-vertexai/update_responses.sh
6262

63+
- name: Clone ai mock responses
64+
if: matrix.module == ':firebase-ai'
65+
run: firebase-ai/update_responses.sh
66+
6367
- name: Add google-services.json
6468
env:
6569
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}

firebase-ai/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Unreleased
2+
* [fixed] **Breaking Change**: Fixed missing builder methods and return types in builders.
3+
* [changed] **Breaking Change**: `LiveModelFutures.connect` now returns `ListenableFuture<LiveSessionFutures>` instead of `ListenableFuture<LiveSession>`.
4+
* **Action Required:** Remove any transformations from LiveSession object to LiveSessionFutures object.
5+
* **Action Required:** Change type of variable handling `LiveModelFutures.connect` to `ListenableFuture<LiveSessionsFutures>`
6+
* [changed] **Breaking Change**: Removed `UNSPECIFIED` value for enum class `ResponseModality`
7+
* **Action Required:** Remove all references to `ResponseModality.UNSPECIFIED`
8+
* [changed] **Breaking Change**: Renamed `LiveGenerationConfig.setResponseModalities` to `LiveGenerationConfig.setResponseModality`
9+
* **Action Required:** Replace all references of `LiveGenerationConfig.setResponseModalities` with `LiveGenerationConfig.setResponseModality`
10+
* [feature] Added support for `HarmBlockThreshold.OFF`. See the
11+
[model documentation](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-filters#how_to_configure_content_filters){: .external}
12+
for more information.
13+
* [fixed] Improved thread usage when using a `LiveGenerativeModel`. (#6870)
14+
* [fixed] Fixed an issue with `LiveContentResponse` audio data not being present when the model was
15+
interrupted or the turn completed. (#6870)
16+
* [fixed] Fixed an issue with `LiveSession` not converting exceptions to `FirebaseVertexAIException`. (#6870)
17+
* * [changed] **Breaking Change**: Removed the `LiveContentResponse.Status` class, and instead have nested the status
18+
fields as properties of `LiveContentResponse`. (#6906)
19+
* [changed] **Breaking Change**: Removed the `LiveContentResponse` class, and instead have provided subclasses
20+
of `LiveServerMessage` that match the responses from the model. (#6910)
21+
* [feature] Added support for the `id` field on `FunctionResponsePart` and `FunctionCallPart`. (#6910)
22+
* [feature] Add support for specifying response modalities in `GenerationConfig`. (#6921)
23+
* [feature] Added a helper field for getting all the `InlineDataPart` from a `GenerateContentResponse`. (#6922)
24+

firebase-ai/README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Firebase AI SDK
2+
3+
For developer documentation, please visit https://firebase.google.com/docs/vertex-ai.
4+
This README is for contributors building and running tests for the SDK.
5+
6+
## Building
7+
8+
All Gradle commands should be run from the root of this repository.
9+
10+
`./gradlew :firebase-ai:publishToMavenLocal`
11+
12+
## Running Tests
13+
14+
> [!IMPORTANT]
15+
> These unit tests require mock response files, which can be downloaded by running
16+
`./firebase-ai/update_responses.sh` from the root of this repository.
17+
18+
Unit tests:
19+
20+
`./gradlew :firebase-ai:check`
21+
22+
Integration tests, requiring a running and connected device (emulator or real):
23+
24+
`./gradlew :firebase-ai:deviceCheck`
25+
26+
## Code Formatting
27+
28+
Format Kotlin code in this SDK in Android Studio using
29+
the [spotless plugin]([https://plugins.jetbrains.com/plugin/14912-ktfmt](https://github.com/diffplug/spotless)
30+
by running:
31+
32+
`./gradlew firebase-ai:spotlessApply`

0 commit comments

Comments
 (0)