PromptFeedback
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public struct PromptFeedback : Sendable
extension PromptFeedback: Decodable
A metadata struct containing any feedback the model had on the prompt it was provided.
-
A type describing possible reasons to block a prompt.
Declaration
Swift
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *) public struct BlockReason : DecodableProtoEnum, Hashable, Sendable
-
The reason a prompt was blocked, if it was blocked.
Declaration
Swift
public let blockReason: BlockReason?
-
A human-readable description of the
blockReason
.Declaration
Swift
public let blockReasonMessage: String?
-
The safety ratings of the prompt.
Declaration
Swift
public let safetyRatings: [SafetyRating]
-
Initializer for SwiftUI previews or tests.
Declaration
Swift
public init(blockReason: BlockReason?, blockReasonMessage: String? = nil, safetyRatings: [SafetyRating])
-
Declaration
Swift
public init(from decoder: Decoder) throws