Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion firebase-ai/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down