logFeedbackAttachment(sentiment:issues:desiredResponseContent:)
Logs and serializes a feedback attachment that includes the content you expected.
Declaration
@backDeployed(before: iOS 26.1, macOS 26.1, visionOS 26.1)
@discardableResult final func logFeedbackAttachment(sentiment: LanguageModelFeedback.Sentiment?, issues: [LanguageModelFeedback.Issue] = [], desiredResponseContent: (any ConvertibleToGeneratedContent)?) -> DataParameters
- 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.
- desiredResponseContent:
The content the model should’ve produced.
Mentioned in
Return Value
A Data object containing the JSON-encoded feedback attachment that can be submitted to Feedback Assistant.