-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
HealthGPTAppDelegate.swift
53 lines (48 loc) · 1.36 KB
/
HealthGPTAppDelegate.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// This source file is part of the Stanford HealthGPT project
//
// SPDX-FileCopyrightText: 2023 Stanford University & Project Contributors (see CONTRIBUTORS.md)
//
// SPDX-License-Identifier: MIT
//
import HealthKit
import Spezi
import SpeziHealthKit
import SpeziLLM
import SpeziLLMLocal
import SpeziLLMOpenAI
import SpeziSecureStorage
import SpeziSpeechSynthesizer
import SwiftUI
class HealthGPTAppDelegate: SpeziAppDelegate {
override var configuration: Configuration {
Configuration(standard: HealthGPTStandard()) {
if HKHealthStore.isHealthDataAvailable() {
healthKit
}
LLMRunner {
LLMOpenAIPlatform()
LLMLocalPlatform()
LLMMockPlatform()
}
HealthDataInterpreter()
HealthDataFetcher()
SecureStorage()
}
}
private var healthKit: HealthKit {
HealthKit {
CollectSamples(
[
HKQuantityType(.stepCount),
HKQuantityType(.activeEnergyBurned),
HKQuantityType(.appleExerciseTime),
HKQuantityType(.bodyMass),
HKQuantityType(.heartRate),
HKCategoryType(.sleepAnalysis)
],
deliverySetting: .manual()
)
}
}
}