struct GeminiFeedbackTraitTrait for submitting feedback on AI features. This trait provides a command to submit feedback on AI features, such as AI captions, home briefs, and searchable home. This trait is implemented on structure objects.
-
The trait identifier.
Declaration
Swift
static let identifier: String -
List of all event types on the given Trait.
Currently, only
MatterTraittraits support any events, but this will likely expand to other traits in the future.Declaration
Swift
static let supportedEventTypes: [any Event.Type] -
List of all commands supported by the Trait’s definition. The commands supported by a specific Trait instance may vary.
Declaration
Swift
static var supportedCommandTypes: [any Command.Type] { get } -
Metadata about this
Trait.Declaration
Swift
let metadata: TraitMetadata -
Creates a new Trait instance using data read from the given
TraitDecoder.Throws
HomeError.parseErrorwhen parsing fails.Declaration
Swift
init(decoder: TraitDecoder, interactionProxy: (any InteractionProxy)?, metadata: TraitMetadata) throwsParameters
decoderThe raw data representing this Trait.
interactionProxyProxy to the Interaction Client.
metadataMetadata about this Trait.
-
Writes this object to the given
TraitEncoder. ThrowsHomeError.encodingFailedif the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws -
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
aandb,a == bimplies thata != bisfalse.Declaration
Parameters
lhsA value to compare.
rhsAnother value to compare.
-
Hashes the essential components of this value by feeding them into the given hasher.
Implement this method to conform to the
Hashableprotocol. The components used for hashing must be the same as the components compared in your type’s==operator implementation. Callhasher.combine(_:)with each of these components.Important
In your implementation of
hash(into:), don’t callfinalize()on thehasherinstance provided, or replace it with a different instance. Doing so may become a compile-time error in the future.Declaration
Swift
func hash(into hasher: inout Hasher) -
Context information for AI captions feedback.
Declaration
Swift
struct AiCaptionsContext -
Context information for home briefs feedback.
Declaration
Swift
struct HomeBriefsContext -
Context information for searchable home feedback.
Declaration
Swift
struct SearchableHomeContext -
Feedback payload for AI captions.
Declaration
Swift
struct AiCaptionsFeedback -
Feedback payload for Home Briefs.
Declaration
Swift
struct HomeBriefsFeedback -
Feedback payload for searchable home.
Declaration
Swift
struct SearchableHomeFeedback -
The user-submitted sentiment rating for the generated AI content (for example, a thumbs up or thumbs down).
Declaration
Swift
enum Rating -
Categorized reasons for submitting a negative rating on home briefs or searchable home features.
Declaration
Swift
enum NegativeFeedbackCategory -
Categorized reasons for submitting negative feedback specifically on generated camera event descriptions or video captions.
Declaration
Swift
enum AiCaptionsNegativeFeedbackCategory -
Command to submit AI feedback.
Declaration
Swift
func geminiFeedback(captionsFeedback: Google.GeminiFeedbackTrait.AiCaptionsFeedback? = nil, homeBriefsFeedback: Google.GeminiFeedbackTrait.HomeBriefsFeedback? = nil, searchableHomeFeedback: Google.GeminiFeedbackTrait.SearchableHomeFeedback? = nil) async throws -> Google.GeminiFeedbackTrait.GeminiFeedbackCommandResponseParameters
captionsFeedbackThe captions feedback object.
homeBriefsFeedbackThe home briefs feedback object.
searchableHomeFeedbackThe searchable home feedback object.