Skip to content

Commit 962b57f

Browse files
andrewhearddaymxn
authored andcommitted
Add platform availability annotations
1 parent dd89e20 commit 962b57f

13 files changed

+14
-0
lines changed

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentClientContent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Foundation
1919
/// history and used as part of the prompt to the model to generate content.
2020
///
2121
/// A message here will interrupt any current model generation.
22+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2223
struct BidiGenerateContentClientContent: Encodable {
2324
/// The content appended to the current conversation with the model.
2425
///

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentClientMessage.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import Foundation
1616

1717
/// Messages sent by the client in the BidiGenerateContent RPC call.
18+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
1819
enum BidiGenerateContentClientMessage {
1920
/// Message to be sent in the first and only first client message.
2021
case setup(BidiGenerateContentSetup)
@@ -29,6 +30,7 @@ enum BidiGenerateContentClientMessage {
2930
case toolResponse(BidiGenerateContentToolResponse)
3031
}
3132

33+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
3234
extension BidiGenerateContentClientMessage: Encodable {
3335
enum CodingKeys: CodingKey {
3436
case setup

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentRealtimeInput.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import Foundation
2828
/// to optimize for a fast start of the response from the model.
2929
/// - Is always assumed to be the user's input (cannot be used to populate
3030
/// conversation history).
31+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
3132
struct BidiGenerateContentRealtimeInput: Encodable {
3233
/// These form the realtime audio input stream.
3334
let audio: Data?

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentServerContent.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Foundation
1919
///
2020
/// Content is generated as quickly as possible, and not in realtime. Clients
2121
/// may choose to buffer and play it out in realtime.
22+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2223
struct BidiGenerateContentServerContent: Decodable {
2324
/// The content that the model has generated as part of the current
2425
/// conversation with the user.

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentServerMessage.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import Foundation
1616

1717
/// Response message for BidiGenerateContent RPC call.
18+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
1819
public struct BidiGenerateContentServerMessage: Sendable {
1920
// TODO: Make this type `internal`
2021

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentSetup.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import Foundation
2020
///
2121
/// Clients should wait for a `BidiGenerateContentSetupComplete` message before
2222
/// sending any additional messages.
23+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2324
struct BidiGenerateContentSetup: Encodable {
2425
/// The fully qualified name of the publisher model.
2526
///

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentSetupComplete.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515
import Foundation
1616

1717
/// Sent in response to a `BidiGenerateContentSetup` message from the client.
18+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
1819
struct BidiGenerateContentSetupComplete: Decodable {}

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentToolCall.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Foundation
1616

1717
/// Request for the client to execute the `function_calls` and return the
1818
/// responses with the matching `id`s.
19+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
1920
struct BidiGenerateContentToolCall: Decodable {
2021
/// The function call to be executed.
2122
let functionCalls: [FunctionCall]?

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentToolCallCancellation.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import Foundation
1919
/// cancelled. If there were side-effects to those tool calls, clients may
2020
/// attempt to undo the tool calls. This message occurs only in cases where the
2121
/// clients interrupt server turns.
22+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2223
struct BidiGenerateContentToolCallCancellation: Decodable {
2324
/// The ids of the tool calls to be cancelled.
2425
let ids: [String]?

FirebaseAI/Sources/Types/Internal/Live/BidiGenerateContentToolResponse.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import Foundation
2222
/// calling happens by exchanging the `Content` parts, while in the bidi
2323
/// GenerateContent APIs function calling happens over these dedicated set of
2424
/// messages.
25+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2526
struct BidiGenerateContentToolResponse: Encodable {
2627
/// The response to the function calls.
2728
let functionResponses: [FunctionResponse]?

0 commit comments

Comments
 (0)