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/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) } } 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..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 @@ -56,19 +56,19 @@ 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 } /** - * 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)