Skip to content

Commit 40a16cc

Browse files
davidmotsonDavid Motsonashvili
and
David Motsonashvili
authored
add changes to match the new api spec, add imagen, and google-ai support (#6907)
Co-authored-by: David Motsonashvili <[email protected]>
1 parent a5a068f commit 40a16cc

27 files changed

+569
-282
lines changed

.github/workflows/ci_tests.yml

+5-1
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

+1-86
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Unreleased
22
* [changed] **Breaking Change**: `LiveModelFutures.connect` now returns `ListenableFuture<LiveSessionFutures>` instead of `ListenableFuture<LiveSession>`.
3-
* **Action Required:** Remove any transformations from LiveSession object to LiveSessionFutures object.
3+
* **Action Required:** Remove any transformations from LiveSession object to LiveSessionFutures object.
44
* **Action Required:** Change type of variable handling `LiveModelFutures.connect` to `ListenableFuture<LiveSessionsFutures>`
55
* [changed] **Breaking Change**: Removed `UNSPECIFIED` value for enum class `ResponseModality`
66
* **Action Required:** Remove all references to `ResponseModality.UNSPECIFIED`
@@ -13,88 +13,3 @@
1313
* [fixed] Fixed an issue with `LiveContentResponse` audio data not being present when the model was
1414
interrupted or the turn completed. (#6870)
1515
* [fixed] Fixed an issue with `LiveSession` not converting exceptions to `FirebaseVertexAIException`. (#6870)
16-
17-
18-
# 16.3.0
19-
* [feature] Emits a warning when attempting to use an incompatible model with
20-
`GenerativeModel` or `ImagenModel`.
21-
* [changed] Added new exception type for quota exceeded scenarios.
22-
* [feature] `CountTokenRequest` now includes `GenerationConfig` from the model.
23-
* [feature] **Public Preview:** Added support for streaming input and output (including audio) using the [Gemini Live API](/docs/vertex-ai/live-api?platform=android)
24-
**Note**: This feature is in Public Preview, which means that it is not subject to any SLA or deprecation policy and could change in backwards-incompatible ways.
25-
* [changed] **Breaking Change**: `ImagenInlineImage.data` now returns the raw
26-
image bytes (in JPEG or PNG format, as specified in
27-
`ImagenInlineImage.mimeType`) instead of Base64-encoded data. (#6800)
28-
* **Action Required:** Remove any Base64 decoding from your
29-
`ImagenInlineImage.data` usage.
30-
* The `asBitmap()` helper method is unaffected and requires no code changes.
31-
32-
# 16.2.0
33-
* [fixed] Added support for new values sent by the server for `FinishReason` and `BlockReason`.
34-
* [changed] Added support for modality-based token count. (#6658)
35-
* [feature] Added support for generating images with Imagen models.
36-
37-
# 16.1.0
38-
* [changed] Internal improvements to correctly handle empty model responses.
39-
40-
# 16.0.2
41-
* [fixed] Improved error message when using an invalid location. (#6428)
42-
* [fixed] Fixed issue where Firebase App Check error tokens were unintentionally missing from the requests. (#6409)
43-
* [fixed] Clarified in the documentation that `Schema.integer` and `Schema.float` only provide hints to the model. (#6420)
44-
* [fixed] Fixed issue were `Schema.double` set the format parameter in `Schema`. (#6432)
45-
46-
# 16.0.1
47-
* [fixed] Fixed issue where authorization headers weren't correctly formatted and were ignored by the backend. (#6400)
48-
49-
# 16.0.0
50-
* [feature] {{firebase_vertexai}} is now Generally Available (GA) and can be
51-
used in production apps.
52-
53-
Use the {{firebase_vertexai_sdk}} to call the {{gemini_api_vertexai_long}}
54-
directly from your app. This client SDK is built specifically for use with
55-
Android apps, offering security options against unauthorized clients
56-
as well as integrations with other Firebase services.
57-
58-
* If you're new to this library, visit the
59-
[getting started guide](/docs/vertex-ai/get-started?platform=android).
60-
61-
* If you were using the preview version of the library, visit the
62-
[migration guide](/docs/vertex-ai/migrate-to-ga?platform=android) to learn
63-
about some important updates.
64-
* [changed] **Breaking Change**: Changed `functionCallingConfig` parameter type to be nullable in `ToolConfig`. (#6373)
65-
* [changed] **Breaking Change**: Removed `functionResponse` accessor method from `GenerateContentResponse`. (#6373)
66-
* [changed] **Breaking Change**: Migrated `FirebaseVertexAIException` from a sealed class to an abstract class, and marked constructors as internal. (#6368)
67-
* [feature] Added support for `title` and `publicationDate` in citations. (#6309)
68-
* [feature] Added support for `frequencyPenalty`, `presencePenalty`, and `HarmBlockMethod`. (#6309)
69-
* [changed] **Breaking Change**: Introduced `Citations` class. Now `CitationMetadata` wraps that type. (#6276)
70-
* [changed] **Breaking Change**: Reworked `Schema` declaration mechanism. (#6258)
71-
* [changed] **Breaking Change**: Reworked function calling mechanism to use the new `Schema` format. Function calls no longer use native types, nor include references to the actual executable code. (#6258)
72-
* [changed] **Breaking Change**: Made `totalBillableCharacters` field in `CountTokens` nullable and optional. (#6294)
73-
* [changed] **Breaking Change**: Removed `UNKNOWN` option for the `HarmBlockThreshold` enum. (#6294)
74-
* [changed] **Breaking Change**: Removed `UNSPECIFIED` option for the `HarmBlockThreshold`, `HarmProbability`, `HarmSeverity`, and `BlockReason` enums. (#6294)
75-
* [changed] **Breaking Change**: Renamed `BlockThreshold` as `HarmBlockThreshold`. (#6262)
76-
* [changed] **Breaking Change**: Renamed all types and methods starting with `blob` to start with `inlineData`. (#6309)
77-
* [changed] **Breaking Change**: Changed the order of arguments in `InlineDataPart` to match `ImagePart`. (#6340)
78-
* [changed] **Breaking Change**: Changed `RequestOption` to accept only `long` timeout values. (#6289)
79-
* [changed] **Breaking Change**: Moved `requestOptions` to the last positional argument in the `generativeModel` argument list. (#6292)
80-
* [changed] **Breaking Change**: Replaced sealed classes with abstract classes for `StringFormat`. (#6334)
81-
* [changed] **Breaking Change**: Refactored enum classes to be normal classes. (#6340)
82-
* [changed] **Breaking Change**: Marked `GenerativeModel` properties as private. (#6309)
83-
* [changed] **Breaking Change**: Changed `method` parameter type to be nullable in `SafetySettings`. (#6379)
84-
85-
# 16.0.0-beta05
86-
* [changed] Merged core networking code into VertexAI from a separate library
87-
* [feature] added support for `responseSchema` in `GenerationConfig`.
88-
89-
# 16.0.0-beta03
90-
* [changed] Breaking Change: changed `Schema.int` to return 32 bit integers instead of 64 bit (long).
91-
* [changed] Added `Schema.long` to return 64-bit integer numbers.
92-
* [changed] Added `Schema.double` to handle floating point numbers.
93-
* [changed] Marked `Schema.num` as deprecated, prefer using `Schema.double`.
94-
* [fixed] Fixed an issue with decoding JSON literals (#6028).
95-
96-
# 16.0.0-beta01
97-
* [feature] Added support for `responseMimeType` in `GenerationConfig`.
98-
* [changed] Renamed `GoogleGenerativeAIException` to `FirebaseVertexAIException`.
99-
* [changed] Updated the KDocs for various classes and functions.
100-

0 commit comments

Comments
 (0)