File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,8 @@ public enum InferenceEngineFactory {
6969 ) async throws -> any InferenceEngine {
7070 switch type {
7171 case . llamaCpp:
72- guard #available( iOS 17 . 0 , macOS 14 . 0 , * ) else {
73- throw LocanaraError . custom ( . featureNotAvailable, " LlamaCppEngine requires iOS 17.0+ or macOS 14.0+ " )
72+ guard #available( iOS 17 . 0 , * ) else {
73+ throw LocanaraError . custom ( . featureNotAvailable, " LlamaCppEngine requires iOS 17.0+ " )
7474 }
7575 let llamaConfig = LlamaCppEngine . Configuration (
7676 numThreads: config. numThreads,
Original file line number Diff line number Diff line change @@ -366,8 +366,8 @@ public final class ModelManager: @unchecked Sendable {
366366 }
367367
368368 // Fall through to built-in LlamaCppEngine
369- guard #available( iOS 17 . 0 , macOS 14 . 0 , * ) else {
370- throw LocanaraError . modelLoadFailed ( " LlamaCppEngine requires iOS 17.0+ or macOS 14.0+ " )
369+ guard #available( iOS 17 . 0 , * ) else {
370+ throw LocanaraError . modelLoadFailed ( " LlamaCppEngine requires iOS 17.0+ " )
371371 }
372372 let engine = try await LlamaCppEngine . create (
373373 modelPath: modelPath,
Original file line number Diff line number Diff line change @@ -313,13 +313,17 @@ public final class ModelStorage: @unchecked Sendable {
313313 ///
314314 /// - Returns: Available space in bytes
315315 public func getAvailableStorage( ) -> Int64 {
316+ #if os(tvOS) || os(watchOS)
317+ return 0
318+ #else
316319 do {
317320 let values = try baseDirectory. resourceValues ( forKeys: [ . volumeAvailableCapacityForImportantUsageKey] )
318321 return values. volumeAvailableCapacityForImportantUsage ?? 0
319322 } catch {
320323 logger. error ( " Failed to get available storage: \( error. localizedDescription) " )
321324 return 0
322325 }
326+ #endif
323327 }
324328
325329 /// Check if there's enough space for a model
You can’t perform that action at this time.
0 commit comments