diff --git a/Sources/GoogleAI/Chat.swift b/Sources/GoogleAI/Chat.swift index 6549df4..9c6a6d7 100644 --- a/Sources/GoogleAI/Chat.swift +++ b/Sources/GoogleAI/Chat.swift @@ -16,7 +16,7 @@ import Foundation /// An object that represents a back-and-forth chat with a model, capturing the history and saving /// the context in memory between each message sent. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public class Chat { private let model: GenerativeModel diff --git a/Sources/GoogleAI/CountTokensRequest.swift b/Sources/GoogleAI/CountTokensRequest.swift index d8bfc0e..b6d7105 100644 --- a/Sources/GoogleAI/CountTokensRequest.swift +++ b/Sources/GoogleAI/CountTokensRequest.swift @@ -14,14 +14,14 @@ import Foundation -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) struct CountTokensRequest { let model: String let generateContentRequest: GenerateContentRequest let options: RequestOptions } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension CountTokensRequest: GenerativeAIRequest { typealias Response = CountTokensResponse @@ -31,7 +31,7 @@ extension CountTokensRequest: GenerativeAIRequest { } /// The model's response to a count tokens request. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct CountTokensResponse { /// The total number of tokens in the input given to the model as a prompt. public let totalTokens: Int @@ -39,12 +39,12 @@ public struct CountTokensResponse { // MARK: - Codable Conformances -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension CountTokensRequest: Encodable { enum CodingKeys: CodingKey { case generateContentRequest } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension CountTokensResponse: Decodable {} diff --git a/Sources/GoogleAI/GenerateContentError.swift b/Sources/GoogleAI/GenerateContentError.swift index 055928e..2d6a5be 100644 --- a/Sources/GoogleAI/GenerateContentError.swift +++ b/Sources/GoogleAI/GenerateContentError.swift @@ -15,7 +15,7 @@ import Foundation /// Errors that occur when generating content from a model. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public enum GenerateContentError: Error { /// An error occurred when constructing the prompt. Examine the related error for details. case promptImageContentError(underlying: ImageConversionError) diff --git a/Sources/GoogleAI/GenerateContentRequest.swift b/Sources/GoogleAI/GenerateContentRequest.swift index c360583..b3bd98c 100644 --- a/Sources/GoogleAI/GenerateContentRequest.swift +++ b/Sources/GoogleAI/GenerateContentRequest.swift @@ -14,7 +14,7 @@ import Foundation -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) struct GenerateContentRequest { /// Model name. let model: String @@ -28,7 +28,7 @@ struct GenerateContentRequest { let options: RequestOptions } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension GenerateContentRequest: Encodable { enum CodingKeys: String, CodingKey { case model @@ -41,7 +41,7 @@ extension GenerateContentRequest: Encodable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension GenerateContentRequest: GenerativeAIRequest { typealias Response = GenerateContentResponse diff --git a/Sources/GoogleAI/GenerateContentResponse.swift b/Sources/GoogleAI/GenerateContentResponse.swift index 04c41f7..afbbb53 100644 --- a/Sources/GoogleAI/GenerateContentResponse.swift +++ b/Sources/GoogleAI/GenerateContentResponse.swift @@ -15,7 +15,7 @@ import Foundation /// The model's response to a generate content request. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct GenerateContentResponse { /// Token usage metadata for processing the generate content request. public struct UsageMetadata { @@ -82,7 +82,7 @@ public struct GenerateContentResponse { /// A struct representing a possible reply to a content generation prompt. Each content generation /// prompt may produce multiple candidate responses. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct CandidateResponse { /// The response's content. public let content: ModelContent @@ -108,14 +108,14 @@ public struct CandidateResponse { } /// A collection of source attributions for a piece of content. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct CitationMetadata { /// A list of individual cited sources and the parts of the content to which they apply. public let citationSources: [Citation] } /// A struct describing a source attribution. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct Citation { /// The inclusive beginning of a sequence in a model response that derives from a cited source. public let startIndex: Int @@ -131,7 +131,7 @@ public struct Citation { } /// A value enumerating possible reasons for a model to terminate a content generation request. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public enum FinishReason: String { case unknown = "FINISH_REASON_UNKNOWN" @@ -156,7 +156,7 @@ public enum FinishReason: String { } /// A metadata struct containing any feedback the model had on the prompt it was provided. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct PromptFeedback { /// A type describing possible reasons to block a prompt. public enum BlockReason: String { @@ -188,7 +188,7 @@ public struct PromptFeedback { // MARK: - Codable Conformances -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension GenerateContentResponse: Decodable { enum CodingKeys: CodingKey { case candidates @@ -222,7 +222,7 @@ extension GenerateContentResponse: Decodable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension GenerateContentResponse.UsageMetadata: Decodable { enum CodingKeys: CodingKey { case promptTokenCount @@ -239,7 +239,7 @@ extension GenerateContentResponse.UsageMetadata: Decodable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension CandidateResponse: Decodable { enum CodingKeys: CodingKey { case content @@ -286,10 +286,10 @@ extension CandidateResponse: Decodable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension CitationMetadata: Decodable {} -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension Citation: Decodable { enum CodingKeys: CodingKey { case startIndex @@ -312,7 +312,7 @@ extension Citation: Decodable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension FinishReason: Decodable { public init(from decoder: Decoder) throws { let value = try decoder.singleValueContainer().decode(String.self) @@ -327,7 +327,7 @@ extension FinishReason: Decodable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension PromptFeedback.BlockReason: Decodable { public init(from decoder: Decoder) throws { let value = try decoder.singleValueContainer().decode(String.self) @@ -342,7 +342,7 @@ extension PromptFeedback.BlockReason: Decodable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension PromptFeedback: Decodable { enum CodingKeys: CodingKey { case blockReason diff --git a/Sources/GoogleAI/GenerationConfig.swift b/Sources/GoogleAI/GenerationConfig.swift index c4bd37c..137a74f 100644 --- a/Sources/GoogleAI/GenerationConfig.swift +++ b/Sources/GoogleAI/GenerationConfig.swift @@ -16,7 +16,7 @@ import Foundation /// A struct defining model parameters to be used when sending generative AI /// requests to the backend model. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct GenerationConfig { /// A parameter controlling the degree of randomness in token selection. A /// temperature of zero is deterministic, always choosing the @@ -106,5 +106,5 @@ public struct GenerationConfig { // MARK: - Codable Conformances -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension GenerationConfig: Encodable {} diff --git a/Sources/GoogleAI/GenerativeAIRequest.swift b/Sources/GoogleAI/GenerativeAIRequest.swift index d468576..1faa2c8 100644 --- a/Sources/GoogleAI/GenerativeAIRequest.swift +++ b/Sources/GoogleAI/GenerativeAIRequest.swift @@ -14,7 +14,7 @@ import Foundation -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) protocol GenerativeAIRequest: Encodable { associatedtype Response: Decodable @@ -24,7 +24,7 @@ protocol GenerativeAIRequest: Encodable { } /// Configuration parameters for sending requests to the backend. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct RequestOptions { /// The request’s timeout interval in seconds. let timeout: TimeInterval diff --git a/Sources/GoogleAI/GenerativeAIService.swift b/Sources/GoogleAI/GenerativeAIService.swift index ed0a6df..3e8cc88 100644 --- a/Sources/GoogleAI/GenerativeAIService.swift +++ b/Sources/GoogleAI/GenerativeAIService.swift @@ -14,7 +14,7 @@ import Foundation -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) struct GenerativeAIService { /// Gives permission to talk to the backend. private let apiKey: String diff --git a/Sources/GoogleAI/GenerativeAISwift.swift b/Sources/GoogleAI/GenerativeAISwift.swift index 0eb6253..9de722d 100644 --- a/Sources/GoogleAI/GenerativeAISwift.swift +++ b/Sources/GoogleAI/GenerativeAISwift.swift @@ -18,7 +18,7 @@ import Foundation #endif /// Constants associated with the GenerativeAISwift SDK. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public enum GenerativeAISwift { /// String value of the SDK version public static let version = "0.5.4" diff --git a/Sources/GoogleAI/GenerativeModel.swift b/Sources/GoogleAI/GenerativeModel.swift index fc9c985..ac8cf30 100644 --- a/Sources/GoogleAI/GenerativeModel.swift +++ b/Sources/GoogleAI/GenerativeModel.swift @@ -16,7 +16,7 @@ import Foundation /// A type that represents a remote multimodal model (like Gemini), with the ability to generate /// content based on various input types. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public final class GenerativeModel { // The prefix for a model resource in the Gemini API. private static let modelResourcePrefix = "models/" @@ -370,7 +370,7 @@ public final class GenerativeModel { } /// An error thrown in `GenerativeModel.countTokens(_:)`. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public enum CountTokensError: Error { case internalError(underlying: Error) } diff --git a/Sources/GoogleAI/Logging.swift b/Sources/GoogleAI/Logging.swift index 458c34e..73dda23 100644 --- a/Sources/GoogleAI/Logging.swift +++ b/Sources/GoogleAI/Logging.swift @@ -15,7 +15,7 @@ import Foundation import OSLog -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) struct Logging { /// Subsystem that should be used for all Loggers. static let subsystem = "com.google.generative-ai" diff --git a/Sources/GoogleAI/ModelContent.swift b/Sources/GoogleAI/ModelContent.swift index 979c406..0106927 100644 --- a/Sources/GoogleAI/ModelContent.swift +++ b/Sources/GoogleAI/ModelContent.swift @@ -17,7 +17,7 @@ import Foundation /// A type describing data in media formats interpretable by an AI model. Each generative AI /// request or response contains an `Array` of ``ModelContent``s, and each ``ModelContent`` value /// may comprise multiple heterogeneous ``ModelContent/Part``s. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct ModelContent: Equatable { /// A discrete piece of data in a media format intepretable by an AI model. Within a single value /// of ``Part``, different data types may not mix. @@ -118,10 +118,10 @@ public struct ModelContent: Equatable { // MARK: Codable Conformances -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension ModelContent: Codable {} -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension ModelContent.Part: Codable { enum CodingKeys: String, CodingKey { case text diff --git a/Sources/GoogleAI/PartsRepresentable+Image.swift b/Sources/GoogleAI/PartsRepresentable+Image.swift index 052a004..bc37cbd 100644 --- a/Sources/GoogleAI/PartsRepresentable+Image.swift +++ b/Sources/GoogleAI/PartsRepresentable+Image.swift @@ -38,7 +38,7 @@ public enum ImageConversionError: Error { #if canImport(UIKit) /// Enables images to be representable as ``ThrowingPartsRepresentable``. - @available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) + @available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension UIImage: ThrowingPartsRepresentable { public func tryPartsValue() throws -> [ModelContent.Part] { guard let data = jpegData(compressionQuality: imageCompressionQuality) else { @@ -50,7 +50,7 @@ public enum ImageConversionError: Error { #elseif canImport(AppKit) /// Enables images to be representable as ``ThrowingPartsRepresentable``. - @available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) + @available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension NSImage: ThrowingPartsRepresentable { public func tryPartsValue() throws -> [ModelContent.Part] { guard let cgImage = cgImage(forProposedRect: nil, context: nil, hints: nil) else { @@ -67,7 +67,7 @@ public enum ImageConversionError: Error { #endif /// Enables `CGImages` to be representable as model content. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension CGImage: ThrowingPartsRepresentable { public func tryPartsValue() throws -> [ModelContent.Part] { let output = NSMutableData() @@ -88,7 +88,7 @@ extension CGImage: ThrowingPartsRepresentable { } /// Enables `CIImages` to be representable as model content. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension CIImage: ThrowingPartsRepresentable { public func tryPartsValue() throws -> [ModelContent.Part] { let context = CIContext() diff --git a/Sources/GoogleAI/PartsRepresentable.swift b/Sources/GoogleAI/PartsRepresentable.swift index 05ba0d9..a4272ad 100644 --- a/Sources/GoogleAI/PartsRepresentable.swift +++ b/Sources/GoogleAI/PartsRepresentable.swift @@ -16,7 +16,7 @@ import Foundation /// A protocol describing any data that could be serialized to model-interpretable input data, /// where the serialization process might fail with an error. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public protocol ThrowingPartsRepresentable { func tryPartsValue() throws -> [ModelContent.Part] } @@ -24,12 +24,12 @@ public protocol ThrowingPartsRepresentable { /// A protocol describing any data that could be serialized to model-interpretable input data, /// where the serialization process cannot fail with an error. For a failable conversion, see /// ``ThrowingPartsRepresentable`` -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public protocol PartsRepresentable: ThrowingPartsRepresentable { var partsValue: [ModelContent.Part] { get } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public extension PartsRepresentable { func tryPartsValue() throws -> [ModelContent.Part] { return partsValue @@ -37,7 +37,7 @@ public extension PartsRepresentable { } /// Enables a ``ModelContent.Part`` to be passed in as ``ThrowingPartsRepresentable``. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension ModelContent.Part: ThrowingPartsRepresentable { public typealias ErrorType = Never public func tryPartsValue() throws -> [ModelContent.Part] { @@ -47,7 +47,7 @@ extension ModelContent.Part: ThrowingPartsRepresentable { /// Enable an `Array` of ``ThrowingPartsRepresentable`` values to be passed in as a single /// ``ThrowingPartsRepresentable``. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension [ThrowingPartsRepresentable]: ThrowingPartsRepresentable { public func tryPartsValue() throws -> [ModelContent.Part] { return try compactMap { element in @@ -58,7 +58,7 @@ extension [ThrowingPartsRepresentable]: ThrowingPartsRepresentable { } /// Enables a `String` to be passed in as ``ThrowingPartsRepresentable``. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension String: PartsRepresentable { public var partsValue: [ModelContent.Part] { return [.text(self)] diff --git a/Sources/GoogleAI/Safety.swift b/Sources/GoogleAI/Safety.swift index d2adc4a..0deaf3e 100644 --- a/Sources/GoogleAI/Safety.swift +++ b/Sources/GoogleAI/Safety.swift @@ -17,7 +17,7 @@ import Foundation /// A type defining potentially harmful media categories and their model-assigned ratings. A value /// of this type may be assigned to a category for every model-generated response, not just /// responses that exceed a certain threshold. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct SafetyRating: Equatable, Hashable { /// The category describing the potential harm a piece of content may pose. See /// ``SafetySetting/HarmCategory`` for a list of possible values. @@ -61,7 +61,7 @@ public struct SafetyRating: Equatable, Hashable { } /// Safety feedback for an entire request. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct SafetyFeedback { /// Safety rating evaluated from content. public let rating: SafetyRating @@ -78,7 +78,7 @@ public struct SafetyFeedback { /// A type used to specify a threshold for harmful content, beyond which the model will return a /// fallback response instead of generated content. -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) public struct SafetySetting { /// A type describing safety attributes, which include harmful categories and topics that can /// be considered sensitive. @@ -143,7 +143,7 @@ public struct SafetySetting { // MARK: - Codable Conformances -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension SafetyRating.HarmProbability: Codable { public init(from decoder: Decoder) throws { let value = try decoder.singleValueContainer().decode(String.self) @@ -158,13 +158,13 @@ extension SafetyRating.HarmProbability: Codable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension SafetyRating: Decodable {} -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension SafetyFeedback: Decodable {} -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension SafetySetting.HarmCategory: Codable { public init(from decoder: Decoder) throws { let value = try decoder.singleValueContainer().decode(String.self) @@ -179,7 +179,7 @@ extension SafetySetting.HarmCategory: Codable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension SafetySetting.BlockThreshold: Codable { public init(from decoder: Decoder) throws { let value = try decoder.singleValueContainer().decode(String.self) @@ -194,5 +194,5 @@ extension SafetySetting.BlockThreshold: Codable { } } -@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, *) +@available(iOS 15.0, macOS 11.0, macCatalyst 15.0, watchOS 7.0, *) extension SafetySetting: Codable {}