|
| 1 | +// Copyright 2025 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +import Foundation |
| 16 | + |
| 17 | +@available(iOS 15.0, macOS 12.0, macCatalyst 15.0, tvOS 15.0, watchOS 8.0, *) |
| 18 | +public final class LiveGenerativeModel { |
| 19 | + let modelResourceName: String |
| 20 | + let apiConfig: APIConfig |
| 21 | + let requestOptions: RequestOptions |
| 22 | + |
| 23 | + init(modelResourceName: String, |
| 24 | + firebaseInfo: FirebaseInfo, |
| 25 | + apiConfig: APIConfig, |
| 26 | + requestOptions: RequestOptions, |
| 27 | + urlSession: URLSession = GenAIURLSession.default) { |
| 28 | + self.modelResourceName = modelResourceName |
| 29 | + self.apiConfig = apiConfig |
| 30 | + // TODO: Add LiveGenerationConfig |
| 31 | + // TODO: Add tools |
| 32 | + // TODO: Add tool config |
| 33 | + // TODO: Add system instruction |
| 34 | + self.requestOptions = requestOptions |
| 35 | + } |
| 36 | + |
| 37 | + public func connect() async throws -> LiveSession { |
| 38 | + // TODO: Implement connection |
| 39 | + return LiveSession() |
| 40 | + } |
| 41 | +} |
0 commit comments