@@ -310,7 +310,7 @@ public struct PromptFeedback: Sendable {
310
310
/// or Vertex AI Gemini API (see [Service Terms](https://cloud.google.com/terms/service-terms)
311
311
/// section within the Service Specific Terms).
312
312
@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
313
- public struct GroundingMetadata : Sendable {
313
+ public struct GroundingMetadata : Sendable , Equatable , Hashable {
314
314
/// A list of web search queries that the model performed to gather the grounding information.
315
315
/// These can be used to allow users to explore the search results themselves.
316
316
public let webSearchQueries : [ String ]
@@ -327,7 +327,7 @@ public struct GroundingMetadata: Sendable {
327
327
328
328
/// A struct representing the Google Search entry point.
329
329
@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
330
- public struct SearchEntryPoint : Sendable {
330
+ public struct SearchEntryPoint : Sendable , Equatable , Hashable {
331
331
/// An HTML/CSS snippet that can be embedded in your app.
332
332
///
333
333
/// To ensure proper rendering, it's recommended to display this content within a `WKWebView`.
@@ -337,14 +337,14 @@ public struct GroundingMetadata: Sendable {
337
337
/// Represents a chunk of retrieved data that supports a claim in the model's response. This is
338
338
/// part of the grounding information provided when grounding is enabled.
339
339
@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
340
- public struct GroundingChunk : Sendable {
340
+ public struct GroundingChunk : Sendable , Equatable , Hashable {
341
341
/// Contains details if the grounding chunk is from a web source.
342
342
public let web : WebGroundingChunk ?
343
343
}
344
344
345
345
/// A grounding chunk sourced from the web.
346
346
@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
347
- public struct WebGroundingChunk : Sendable {
347
+ public struct WebGroundingChunk : Sendable , Equatable , Hashable {
348
348
/// The URI of the retrieved web page.
349
349
public let uri : String ?
350
350
/// The title of the retrieved web page.
@@ -358,7 +358,7 @@ public struct GroundingMetadata: Sendable {
358
358
/// Provides information about how a specific segment of the model's response is supported by the
359
359
/// retrieved grounding chunks.
360
360
@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
361
- public struct GroundingSupport : Sendable {
361
+ public struct GroundingSupport : Sendable , Equatable , Hashable {
362
362
/// Specifies the segment of the model's response content that this grounding support pertains
363
363
/// to.
364
364
public let segment : Segment
@@ -391,7 +391,7 @@ public struct GroundingMetadata: Sendable {
391
391
/// Represents a specific segment within a ``ModelContent`` struct, often used to pinpoint the
392
392
/// exact location of text or data that grounding information refers to.
393
393
@available ( iOS 15 . 0 , macOS 12 . 0 , macCatalyst 15 . 0 , tvOS 15 . 0 , watchOS 8 . 0 , * )
394
- public struct Segment : Sendable {
394
+ public struct Segment : Sendable , Equatable , Hashable {
395
395
/// The zero-based index of the ``Part`` object within the `parts` array of its parent
396
396
/// ``ModelContent`` object. This identifies which part of the content the segment belongs to.
397
397
public let partIndex : Int
0 commit comments