From 0a75988d5af11a63a63e14e7662afd751bc9dd7c Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Wed, 17 Sep 2025 10:22:14 -0700 Subject: [PATCH 1/3] Fixing documentation for M170 --- firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt index d3a707cdbc5..dec10e4a196 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt @@ -56,7 +56,7 @@ internal constructor( return Tool(functionDeclarations, null, null) } - /** Creates a [Tool] instance that allows the model to use Code Execution. */ + /** Creates a [Tool] instance that allows the model to use code execution. */ @JvmStatic public fun codeExecution(): Tool { return codeExecutionInstance From e45d47b6ff14bb9a9787a7480801f91190289645 Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Wed, 17 Sep 2025 11:12:47 -0700 Subject: [PATCH 2/3] update harmcategory docs --- .../google/firebase/ai/type/HarmCategory.kt | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/HarmCategory.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/HarmCategory.kt index 43113e08104..871470f6a25 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/HarmCategory.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/HarmCategory.kt @@ -71,31 +71,34 @@ public class HarmCategory private constructor(public val ordinal: Int) { /** A new and not yet supported value. */ @JvmField public val UNKNOWN: HarmCategory = HarmCategory(0) - /** Harassment content. */ + /** Represents the harm category for content that is classified as harassment. */ @JvmField public val HARASSMENT: HarmCategory = HarmCategory(1) - /** Hate speech and content. */ + /** Represents the harm category for content that is classified as hate speech. */ @JvmField public val HATE_SPEECH: HarmCategory = HarmCategory(2) - /** Sexually explicit content. */ + /** Represents the harm category for content that is classified as sexually explicit content. */ @JvmField public val SEXUALLY_EXPLICIT: HarmCategory = HarmCategory(3) - /** Dangerous content. */ + /** Represents the harm category for content that is classified as dangerous content. */ @JvmField public val DANGEROUS_CONTENT: HarmCategory = HarmCategory(4) - /** Content that may be used to harm civic integrity. */ + /** + * Represents the harm category for content that is classified as content that may be used to + * harm civic integrity. + */ @JvmField public val CIVIC_INTEGRITY: HarmCategory = HarmCategory(5) - /** Content that is image hate. */ + /** Represents the harm category for image content that is classified as hateful. */ @JvmField public val IMAGE_HATE: HarmCategory = HarmCategory(6) - /** Image dangerous content. */ + /** Represents the harm category for image content that is classified as dangerous. */ @JvmField public val IMAGE_DANGEROUS_CONTENT: HarmCategory = HarmCategory(7) - /** Content is image harassment. */ + /** Represents the harm category for image content that is classified as harassment. */ @JvmField public val IMAGE_HARASSMENT: HarmCategory = HarmCategory(8) - /** Image sexually explicit content. */ + /** Represents the harm category for image content that is classified as sexually explicit. */ @JvmField public val IMAGE_SEXUALLY_EXPLICIT: HarmCategory = HarmCategory(9) } } From d83f48929753ec6b7127979edba48cdb59887dd2 Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Mon, 29 Sep 2025 14:40:53 -0700 Subject: [PATCH 3/3] Grounding with Google Search -> grounding with Google Search --- firebase-ai/CHANGELOG.md | 2 +- .../src/main/kotlin/com/google/firebase/ai/type/Candidate.kt | 2 +- .../main/kotlin/com/google/firebase/ai/type/GoogleSearch.kt | 2 +- .../src/main/kotlin/com/google/firebase/ai/type/Tool.kt | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/firebase-ai/CHANGELOG.md b/firebase-ai/CHANGELOG.md index 0349e18949c..1d0f91db779 100644 --- a/firebase-ai/CHANGELOG.md +++ b/firebase-ai/CHANGELOG.md @@ -42,7 +42,7 @@ - [feature] Added support for configuring the "thinking" budget when using Gemini 2.5 series models. (#6990) -- [feature] **Breaking Change**: Add support for Grounding with Google Search (#7042). +- [feature] **Breaking Change**: Add support for grounding with Google Search (#7042). - **Action Required:** Update all references of `groundingAttributions`, `webSearchQueries`, `retrievalQueries` in `GroundingMetadata` to be non-optional. - [changed] require at least one argument for `generateContent()`, `generateContentStream()` and diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt index b7671aa0ccb..04cb9cc974a 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Candidate.kt @@ -297,7 +297,7 @@ public class FinishReason private constructor(public val name: String, public va /** * Metadata returned to the client when grounding is enabled. * - * If using Grounding with Google Search, you are required to comply with the "Grounding with Google + * If using grounding with Google Search, you are required to comply with the "Grounding with Google * Search" usage requirements for your chosen API provider: * [Gemini Developer API](https://ai.google.dev/gemini-api/terms#grounding-with-google-search) or * Vertex AI Gemini API (see [Service Terms](https://cloud.google.com/terms/service-terms) section diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/GoogleSearch.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/GoogleSearch.kt index 82d7967c1ce..b192c2d33f5 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/GoogleSearch.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/GoogleSearch.kt @@ -22,7 +22,7 @@ import kotlinx.serialization.Serializable * A tool that allows the generative model to connect to Google Search to access and incorporate * up-to-date information from the web into its responses. * - * When using this feature, you are required to comply with the "Grounding with Google Search" usage + * When using this feature, you are required to comply with the "grounding with Google Search" usage * requirements for your chosen API provider: * [Gemini Developer API](https://ai.google.dev/gemini-api/terms#grounding-with-google-search) or * Vertex AI Gemini API (see [Service Terms](https://cloud.google.com/terms/service-terms) section diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt index dec10e4a196..471e58f50b5 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Tool.kt @@ -63,12 +63,12 @@ internal constructor( } /** - * Creates a [Tool] instance that allows the model to use Grounding with Google Search. + * Creates a [Tool] instance that allows the model to use grounding with Google Search. * * Grounding with Google Search can be used to allow the model to connect to Google Search to * access and incorporate up-to-date information from the web into it's responses. * - * When using this feature, you are required to comply with the "Grounding with Google Search" + * When using this feature, you are required to comply with the "grounding with Google Search" * usage requirements for your chosen API provider: * [Gemini Developer API](https://ai.google.dev/gemini-api/terms#grounding-with-google-search) * or Vertex AI Gemini API (see [Service Terms](https://cloud.google.com/terms/service-terms)