From 5c4104af12fd2346edfc8b73ebe69d856f2f84e7 Mon Sep 17 00:00:00 2001 From: Joan Disho Date: Fri, 17 Jan 2025 14:43:26 +0100 Subject: [PATCH] Resolve various compile-time warnings --- LLMonFHIR/Helper/CodableArray+RawRepresentable.swift | 2 +- LLMonFHIR/LLMonFHIRStandard.swift | 2 +- LLMonFHIR/Settings/SettingsView.swift | 6 +++--- LLMonFHIR/SharedContext/StorageKeys.swift | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/LLMonFHIR/Helper/CodableArray+RawRepresentable.swift b/LLMonFHIR/Helper/CodableArray+RawRepresentable.swift index 006984a..3326bcb 100644 --- a/LLMonFHIR/Helper/CodableArray+RawRepresentable.swift +++ b/LLMonFHIR/Helper/CodableArray+RawRepresentable.swift @@ -9,7 +9,7 @@ import Foundation -extension Array: RawRepresentable where Element: Codable { +extension Array: @retroactive RawRepresentable where Element: Codable { public var rawValue: String { guard let data = try? JSONEncoder().encode(self), let rawValue = String(data: data, encoding: .utf8) else { diff --git a/LLMonFHIR/LLMonFHIRStandard.swift b/LLMonFHIR/LLMonFHIRStandard.swift index 51dd0a7..9810b4b 100644 --- a/LLMonFHIR/LLMonFHIRStandard.swift +++ b/LLMonFHIR/LLMonFHIRStandard.swift @@ -14,7 +14,7 @@ import SwiftUI actor LLMonFHIRStandard: Standard, HealthKitConstraint, EnvironmentAccessible { - @Dependency var fhirStore: FHIRStore + @Dependency(FHIRStore.self) var fhirStore @MainActor var useHealthKitResources = true private var samples: [HKSample] = [] diff --git a/LLMonFHIR/Settings/SettingsView.swift b/LLMonFHIR/Settings/SettingsView.swift index 43ad8ad..3754ab6 100644 --- a/LLMonFHIR/Settings/SettingsView.swift +++ b/LLMonFHIR/Settings/SettingsView.swift @@ -147,7 +147,7 @@ struct SettingsView: View { case .openAIModelSummary: LLMOpenAIModelOnboardingStep( actionText: "OPEN_AI_MODEL_SAVE_ACTION", - models: [.gpt4_turbo_preview, .gpt4, .gpt3_5Turbo] + models: [.gpt4_o, .gpt4, .gpt3_5Turbo] ) { chosenModelType in openAIModelSummarization = chosenModelType resourceSummary.changeLLMSchema( @@ -163,7 +163,7 @@ struct SettingsView: View { case .openAIModelInterpretation: LLMOpenAIModelOnboardingStep( actionText: "OPEN_AI_MODEL_SAVE_ACTION", - models: [.gpt4_turbo_preview, .gpt4, .gpt3_5Turbo] + models: [.gpt4_o, .gpt4, .gpt3_5Turbo] ) { chosenModelType in openAIModelInterpretation = chosenModelType resourceInterpreter.changeLLMSchema( @@ -179,7 +179,7 @@ struct SettingsView: View { case .openAIModelMultipleInterpretation: LLMOpenAIModelOnboardingStep( actionText: "OPEN_AI_MODEL_SAVE_ACTION", - models: [.gpt4_turbo_preview, .gpt4] + models: [.gpt4_o, .gpt4] ) { chosenModelType in openAIModelMultipleInterpretation = chosenModelType multipleResourceInterpreter.changeLLMSchema( diff --git a/LLMonFHIR/SharedContext/StorageKeys.swift b/LLMonFHIR/SharedContext/StorageKeys.swift index c7d8f50..dc5b5cd 100644 --- a/LLMonFHIR/SharedContext/StorageKeys.swift +++ b/LLMonFHIR/SharedContext/StorageKeys.swift @@ -14,7 +14,7 @@ enum StorageKeys { enum Defaults { static let enableTextToSpeech = false static let resourceLimit = 250 - static let openAIModel: LLMOpenAIModelType = .gpt4_turbo_preview + static let openAIModel: LLMOpenAIModelType = .gpt4_turbo }