Skip to content

Commit 6003c98

Browse files
committed
Merge branch 'main' into rpf/add-thinking-budget-support
2 parents f780f6b + b7e1397 commit 6003c98

File tree

195 files changed

+3865
-10174
lines changed

Some content is hidden

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

195 files changed

+3865
-10174
lines changed

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,6 @@ jobs:
169169

170170
- name: Publish Test Results
171171
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
172+
if: always()
172173
with:
173174
files: "artifacts/**/*.xml"

.github/workflows/plugins-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
./gradlew plugins:check
3131
- name: Publish Test Results
3232
uses: EnricoMi/publish-unit-test-result-action@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0
33+
if: always()
3334
with:
3435
files: "**/build/test-results/**/*.xml"
3536
check_name: "plugins test results"

appcheck/firebase-appcheck/firebase-appcheck.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ dependencies {
7070
testImplementation libs.junit
7171
testImplementation libs.junit
7272
testImplementation libs.mockito.core
73-
testImplementation libs.mockito.mockito.inline
7473
testImplementation libs.robolectric
7574

7675
androidTestImplementation project(':appcheck:firebase-appcheck')
@@ -85,5 +84,4 @@ dependencies {
8584
androidTestImplementation libs.truth
8685
androidTestImplementation libs.junit
8786
androidTestImplementation libs.mockito.core
88-
androidTestImplementation libs.mockito.mockito.inline
8987
}

ci/fireci/fireciplugins/macrobenchmark/run/runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ def _process_changed_modules(path: Path) -> List[str]:
119119
":firebase-components": ["Firebase", "ComponentDiscovery", "Runtime"],
120120
":firebase-database": ["fire-rtdb"],
121121
":firebase-datatransport": ["fire-transport"],
122-
":firebase-dynamic-links": ["fire-dl"],
123122
":firebase-crashlytics": ["fire-cls"],
124123
":firebase-crashlytics-ndk": ["fire-cls"],
125124
":firebase-firestore": ["fire-fst"],

docs/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ in your app:
2626

2727
* [`firebase-common`](ktx/common.md)
2828
* [`firebase-crashlytics`](ktx/crashlytics.md)
29-
* [`firebase-dynamic-links`](ktx/dynamic-links.md)
3029
* [`firebase-firestore`](ktx/firestore.md)
3130
* [`firebase-functions`](ktx/functions.md)
3231
* [`firebase-inappmessaging`](ktx/inappmessaging.md)

docs/ktx/dynamic-links.md

Lines changed: 0 additions & 170 deletions
This file was deleted.

firebase-ai/CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Unreleased
22
* [feature] Added support for configuring the "thinking" budget when using Gemini
33
2.5 series models. (#6990)
4+
* [feature] **Breaking Change**: Add support for Grounding with Google Search (#7042).
5+
* **Action Required:** Update all references of `groundingAttributions`, `webSearchQueries`, `retrievalQueries` in `GroundingMetadata` to be non-optional.
46

57
# 16.2.0
68
* [changed] Deprecate the `totalBillableCharacters` field (only usable with pre-2.0 models). (#7042)
@@ -32,4 +34,3 @@
3234

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

firebase-ai/api.txt

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,12 @@ package com.google.firebase.ai.type {
171171
method public com.google.firebase.ai.type.CitationMetadata? getCitationMetadata();
172172
method public com.google.firebase.ai.type.Content getContent();
173173
method public com.google.firebase.ai.type.FinishReason? getFinishReason();
174+
method public com.google.firebase.ai.type.GroundingMetadata? getGroundingMetadata();
174175
method public java.util.List<com.google.firebase.ai.type.SafetyRating> getSafetyRatings();
175176
property public final com.google.firebase.ai.type.CitationMetadata? citationMetadata;
176177
property public final com.google.firebase.ai.type.Content content;
177178
property public final com.google.firebase.ai.type.FinishReason? finishReason;
179+
property public final com.google.firebase.ai.type.GroundingMetadata? groundingMetadata;
178180
property public final java.util.List<com.google.firebase.ai.type.SafetyRating> safetyRatings;
179181
}
180182

@@ -400,6 +402,48 @@ package com.google.firebase.ai.type {
400402
method public com.google.firebase.ai.type.GenerativeBackend vertexAI(String location = "us-central1");
401403
}
402404

405+
public final class GoogleSearch {
406+
ctor public GoogleSearch();
407+
}
408+
409+
@Deprecated public final class GroundingAttribution {
410+
ctor @Deprecated public GroundingAttribution(com.google.firebase.ai.type.Segment segment, Float? confidenceScore);
411+
method @Deprecated public Float? getConfidenceScore();
412+
method @Deprecated public com.google.firebase.ai.type.Segment getSegment();
413+
property @Deprecated public final Float? confidenceScore;
414+
property @Deprecated public final com.google.firebase.ai.type.Segment segment;
415+
}
416+
417+
public final class GroundingChunk {
418+
ctor public GroundingChunk(com.google.firebase.ai.type.WebGroundingChunk? web);
419+
method public com.google.firebase.ai.type.WebGroundingChunk? getWeb();
420+
property public final com.google.firebase.ai.type.WebGroundingChunk? web;
421+
}
422+
423+
public final class GroundingMetadata {
424+
ctor public GroundingMetadata(java.util.List<java.lang.String> webSearchQueries, com.google.firebase.ai.type.SearchEntryPoint? searchEntryPoint, java.util.List<java.lang.String> retrievalQueries, @Deprecated java.util.List<com.google.firebase.ai.type.GroundingAttribution> groundingAttribution, java.util.List<com.google.firebase.ai.type.GroundingChunk> groundingChunks, java.util.List<com.google.firebase.ai.type.GroundingSupport> groundingSupports);
425+
method @Deprecated public java.util.List<com.google.firebase.ai.type.GroundingAttribution> getGroundingAttribution();
426+
method public java.util.List<com.google.firebase.ai.type.GroundingChunk> getGroundingChunks();
427+
method public java.util.List<com.google.firebase.ai.type.GroundingSupport> getGroundingSupports();
428+
method public java.util.List<java.lang.String> getRetrievalQueries();
429+
method public com.google.firebase.ai.type.SearchEntryPoint? getSearchEntryPoint();
430+
method public java.util.List<java.lang.String> getWebSearchQueries();
431+
property @Deprecated public final java.util.List<com.google.firebase.ai.type.GroundingAttribution> groundingAttribution;
432+
property public final java.util.List<com.google.firebase.ai.type.GroundingChunk> groundingChunks;
433+
property public final java.util.List<com.google.firebase.ai.type.GroundingSupport> groundingSupports;
434+
property public final java.util.List<java.lang.String> retrievalQueries;
435+
property public final com.google.firebase.ai.type.SearchEntryPoint? searchEntryPoint;
436+
property public final java.util.List<java.lang.String> webSearchQueries;
437+
}
438+
439+
public final class GroundingSupport {
440+
ctor public GroundingSupport(com.google.firebase.ai.type.Segment segment, java.util.List<java.lang.Integer> groundingChunkIndices);
441+
method public java.util.List<java.lang.Integer> getGroundingChunkIndices();
442+
method public com.google.firebase.ai.type.Segment getSegment();
443+
property public final java.util.List<java.lang.Integer> groundingChunkIndices;
444+
property public final com.google.firebase.ai.type.Segment segment;
445+
}
446+
403447
public final class HarmBlockMethod {
404448
method public int getOrdinal();
405449
property public final int ordinal;
@@ -899,6 +943,26 @@ package com.google.firebase.ai.type {
899943
method public com.google.firebase.ai.type.Schema str(String? description = null, boolean nullable = false, com.google.firebase.ai.type.StringFormat? format = null, String? title = null);
900944
}
901945

946+
public final class SearchEntryPoint {
947+
ctor public SearchEntryPoint(String renderedContent, String? sdkBlob);
948+
method public String getRenderedContent();
949+
method public String? getSdkBlob();
950+
property public final String renderedContent;
951+
property public final String? sdkBlob;
952+
}
953+
954+
public final class Segment {
955+
ctor public Segment(int startIndex, int endIndex, int partIndex, String text);
956+
method public int getEndIndex();
957+
method public int getPartIndex();
958+
method public int getStartIndex();
959+
method public String getText();
960+
property public final int endIndex;
961+
property public final int partIndex;
962+
property public final int startIndex;
963+
property public final String text;
964+
}
965+
902966
public final class SerializationException extends com.google.firebase.ai.type.FirebaseAIException {
903967
}
904968

@@ -950,11 +1014,13 @@ package com.google.firebase.ai.type {
9501014

9511015
public final class Tool {
9521016
method public static com.google.firebase.ai.type.Tool functionDeclarations(java.util.List<com.google.firebase.ai.type.FunctionDeclaration> functionDeclarations);
1017+
method public static com.google.firebase.ai.type.Tool googleSearch(com.google.firebase.ai.type.GoogleSearch googleSearch = com.google.firebase.ai.type.GoogleSearch());
9531018
field public static final com.google.firebase.ai.type.Tool.Companion Companion;
9541019
}
9551020

9561021
public static final class Tool.Companion {
9571022
method public com.google.firebase.ai.type.Tool functionDeclarations(java.util.List<com.google.firebase.ai.type.FunctionDeclaration> functionDeclarations);
1023+
method public com.google.firebase.ai.type.Tool googleSearch(com.google.firebase.ai.type.GoogleSearch googleSearch = com.google.firebase.ai.type.GoogleSearch());
9581024
}
9591025

9601026
public final class ToolConfig {
@@ -1004,5 +1070,15 @@ package com.google.firebase.ai.type {
10041070
@Deprecated public static final class Voices.Companion {
10051071
}
10061072

1073+
public final class WebGroundingChunk {
1074+
ctor public WebGroundingChunk(String? uri, String? title, String? domain);
1075+
method public String? getDomain();
1076+
method public String? getTitle();
1077+
method public String? getUri();
1078+
property public final String? domain;
1079+
property public final String? title;
1080+
property public final String? uri;
1081+
}
1082+
10071083
}
10081084

firebase-ai/src/androidTest/kotlin/com/google/firebase/ai/ToolTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ class ToolTests {
304304
ToolConfig(
305305
functionCallingConfig = FunctionCallingConfig(FunctionCallingConfig.Mode.ANY)
306306
),
307-
tools = listOf(Tool(functions.toList())),
307+
tools = listOf(Tool.functionDeclarations(functions.toList())),
308308
)
309309
return model
310310
}

0 commit comments

Comments
 (0)