Contents

logFeedbackAttachment(sentiment:issues:desiredResponseText:)

Logs and serializes a feedback attachment that includes the response text you expected.

Declaration

@backDeployed(before: iOS 26.1, macOS 26.1, visionOS 26.1)
@discardableResult final func logFeedbackAttachment(sentiment: LanguageModelFeedback.Sentiment?, issues: [LanguageModelFeedback.Issue] = [], desiredResponseText: String?) -> Data

Parameters

  • sentiment:

    An optional sentiment rating about the model’s output.

  • issues:

    An array of specific issues identified with the model’s response. Defaults to an empty array.

  • desiredResponseText:

    The text the model should have produced, if you have one.

Mentioned in

Return Value

A Data object containing the JSON-encoded feedback attachment that can be submitted to Feedback Assistant.

See Also

Generating feedback