generated from StanfordBDHG/SwiftPackageTemplate
-
-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathPackage.swift
115 lines (112 loc) · 5.09 KB
/
Package.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
// swift-tools-version:6.0
//
// This source file is part of the Stanford Spezi open source project
//
// SPDX-FileCopyrightText: 2022 Stanford University and the project authors (see CONTRIBUTORS.md)
//
// SPDX-License-Identifier: MIT
//
import PackageDescription
let package = Package(
name: "SpeziLLM",
defaultLocalization: "en",
platforms: [
.iOS(.v17),
.visionOS(.v1),
.macOS(.v14)
],
products: [
.library(name: "SpeziLLM", targets: ["SpeziLLM"]),
.library(name: "SpeziLLMLocal", targets: ["SpeziLLMLocal"]),
.library(name: "SpeziLLMLocalDownload", targets: ["SpeziLLMLocalDownload"]),
.library(name: "SpeziLLMOpenAI", targets: ["SpeziLLMOpenAI"]),
.library(name: "SpeziLLMFog", targets: ["SpeziLLMFog"])
],
dependencies: [
.package(url: "https://github.com/ml-explore/mlx-swift", .upToNextMinor(from: "0.21.2")),
.package(url: "https://github.com/ml-explore/mlx-swift-examples", exact: "2.21.2"), // Pin MLX Swift Examples as it doesn't follow semantic versioning
.package(url: "https://github.com/huggingface/swift-transformers", .upToNextMinor(from: "0.1.14")),
.package(url: "https://github.com/StanfordSpezi/Spezi", from: "1.8.0"),
.package(url: "https://github.com/StanfordSpezi/SpeziFoundation", from: "2.1.0"),
.package(url: "https://github.com/StanfordSpezi/SpeziStorage", from: "2.1.0"),
.package(url: "https://github.com/StanfordSpezi/SpeziOnboarding", from: "1.2.2"),
.package(url: "https://github.com/StanfordSpezi/SpeziChat", .upToNextMinor(from: "0.2.3")),
.package(url: "https://github.com/StanfordSpezi/SpeziViews", from: "1.8.0"),
.package(url: "https://github.com/apple/swift-openapi-generator", from: "1.7.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.8.0"),
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.2")
],
targets: [
.target(
name: "SpeziLLM",
dependencies: [
.product(name: "Spezi", package: "Spezi"),
.product(name: "SpeziChat", package: "SpeziChat"),
.product(name: "SpeziViews", package: "SpeziViews")
],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
),
.target(
name: "SpeziLLMLocal",
dependencies: [
.target(name: "SpeziLLM"),
.product(name: "SpeziFoundation", package: "SpeziFoundation"),
.product(name: "Spezi", package: "Spezi"),
.product(name: "MLX", package: "mlx-swift"),
.product(name: "MLXRandom", package: "mlx-swift"),
.product(name: "Transformers", package: "swift-transformers"),
.product(name: "MLXLLM", package: "mlx-swift-examples")
],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
),
.target(
name: "SpeziLLMLocalDownload",
dependencies: [
.product(name: "SpeziOnboarding", package: "SpeziOnboarding"),
.product(name: "SpeziViews", package: "SpeziViews"),
.target(name: "SpeziLLMLocal"),
.product(name: "MLXLLM", package: "mlx-swift-examples")
],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
),
.target(
name: "SpeziLLMOpenAI",
dependencies: [
.target(name: "SpeziLLM"),
.target(name: "GeneratedOpenAIClient"),
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
.product(name: "SpeziFoundation", package: "SpeziFoundation"),
.product(name: "Spezi", package: "Spezi"),
.product(name: "SpeziChat", package: "SpeziChat"),
.product(name: "SpeziKeychainStorage", package: "SpeziStorage"),
.product(name: "SpeziOnboarding", package: "SpeziOnboarding")
],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
),
.target(
name: "SpeziLLMFog",
dependencies: [
.target(name: "SpeziLLM"),
.target(name: "GeneratedOpenAIClient"),
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession"),
.product(name: "Spezi", package: "Spezi")
],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
),
.target(
name: "GeneratedOpenAIClient",
plugins: [
.plugin(name: "OpenAPIGenerator", package: "swift-openapi-generator")
]
),
.testTarget(
name: "SpeziLLMTests",
dependencies: [
.target(name: "SpeziLLMOpenAI")
],
swiftSettings: [.enableUpcomingFeature("ExistentialAny")]
)
]
)