Skip to content

Commit 86df993

Browse files
committed
Merge branch 'dlr/firebaseai-live-api' of github.com:firebase/firebase-ios-sdk into dlr/firebaseai-live-api
2 parents 5a1d836 + 140bfb8 commit 86df993

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

FirebaseAI/Sources/FirebaseAI.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public final class FirebaseAI: Sendable {
146146
/// > Important: Only Live models (typically containing `live-*` in the name) are supported.
147147
///
148148
/// - Parameters:
149-
/// - modelName: The name of the Livemodel to use, for example
149+
/// - modelName: The name of the Live model to use, for example
150150
/// `"gemini-live-2.5-flash-preview"`;
151151
/// see [model versions](https://firebase.google.com/docs/ai-logic/live-api?api=dev#models-that-support-capability)
152152
/// for a list of supported Live models.
@@ -156,6 +156,8 @@ public final class FirebaseAI: Sendable {
156156
/// - systemInstruction: Instructions that direct the model to behave a certain way; currently
157157
/// only text content is supported.
158158
/// - requestOptions: Configuration parameters for sending requests to the backend.
159+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
160+
@available(watchOS, unavailable)
159161
public func liveModel(modelName: String,
160162
generationConfig: LiveGenerationConfig? = nil,
161163
tools: [Tool]? = nil,

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ private import FirebaseCoreInternal
2121
/// friendly interface for sending and consuming data from it.
2222
///
2323
/// Also surfaces a more fine-grained ``WebSocketClosedError`` for when the web socket is closed.
24+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
25+
@available(watchOS, unavailable)
2426
final class AsyncWebSocket: NSObject, @unchecked Sendable, URLSessionWebSocketDelegate {
2527
private let webSocketTask: URLSessionWebSocketTask
2628
private let stream: AsyncThrowingStream<URLSessionWebSocketTask.Message, Error>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +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, *)
18+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
1919
@available(watchOS, unavailable)
2020
struct BidiGenerateContentServerMessage: Sendable {
2121
/// The type of the message.
@@ -48,7 +48,7 @@ struct BidiGenerateContentServerMessage: Sendable {
4848

4949
// MARK: - Decodable
5050

51-
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
51+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
5252
@available(watchOS, unavailable)
5353
extension BidiGenerateContentServerMessage: Decodable {
5454
enum CodingKeys: String, CodingKey {

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,6 @@ struct BidiGenerateContentSetup: Encodable {
7373
}
7474
}
7575

76+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
77+
@available(watchOS, unavailable)
7678
struct BidiAudioTranscriptionConfig: Encodable {}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import Foundation
2828
///
2929
/// This mainly comes into play when we don't want to block developers from sending messages while a
3030
/// session is being reloaded.
31-
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
31+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
3232
@available(watchOS, unavailable)
3333
actor LiveSessionService {
3434
let responses: AsyncThrowingStream<LiveServerMessage, Error>

FirebaseAI/Sources/Types/Public/Live/LiveServerToolCall.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
///
1717
/// The client should return matching ``FunctionResponsePart``, where the `functionId` fields
1818
/// correspond to individual ``FunctionCallPart``s.
19-
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
19+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2020
@available(watchOS, unavailable)
2121
public struct LiveServerToolCall: Sendable {
2222
let serverToolCall: BidiGenerateContentToolCall

FirebaseAI/Sources/Types/Public/Live/LiveSession.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import Foundation
2121
/// through the incremental API (such as ``sendContent(_:turnComplete:)``).
2222
///
2323
/// To create an instance of this class, see ``LiveGenerativeModel``.
24-
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, *)
24+
@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *)
2525
@available(watchOS, unavailable)
2626
public final class LiveSession: Sendable {
2727
private let service: LiveSessionService

0 commit comments

Comments
 (0)