Skip to content

Commit 183be24

Browse files
committed
Update workflows for Xcode 16.1 and add pull model feature
2 parents f021e81 + 791c4c7 commit 183be24

27 files changed

+460
-129
lines changed

.github/workflows/code-quality.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ on:
88
branches:
99
- main
1010

11+
env:
12+
DEVELOPER_DIR: /Applications/Xcode_16.1.app/Contents/Developer
13+
1114
jobs:
1215
test-ios:
13-
runs-on: macos-13
16+
runs-on: macos-15
1417

1518
steps:
1619
- uses: actions/checkout@v3
1720

1821
- name: Build and test
19-
run: xcodebuild test -scheme OllamaKit -destination 'platform=iOS Simulator,name=iPhone 14 Pro'
22+
run: xcodebuild test -scheme OllamaKit -destination 'platform=iOS Simulator,name=iPhone 16 Pro'
2023

2124
test-macos:
22-
runs-on: macos-13
25+
runs-on: macos-15
2326

2427
steps:
2528
- uses: actions/checkout@v3

.github/workflows/deploy-docs.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,12 @@ concurrency:
1313
group: "pages"
1414
cancel-in-progress: false
1515

16+
env:
17+
DEVELOPER_DIR: /Applications/Xcode_16.1.app/Contents/Developer
18+
1619
jobs:
1720
deploy:
18-
runs-on: macos-13
21+
runs-on: macos-15
1922

2023
environment:
2124
name: github-pages

CHANGELOG.md

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,36 @@
1-
# 5.0.5
1+
# 5.0.7
2+
3+
- feat: adds structured output support by @macistador in https://github.com/kevinhermawan/OllamaKit/pull/43
4+
5+
# 5.0.6
6+
7+
- Add support to pull model from library by @lukepistrol in https://github.com/kevinhermawan/OllamaKit/pull/39
8+
- Swift 6 support by @lukepistrol in https://github.com/kevinhermawan/OllamaKit/pull/40
9+
- fix: crash when retrieving model information using Combine by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/41
210

3-
## What's Changed
11+
# 5.0.5
412

513
- fix: parameters aren't encoded by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/36
614

715
# 5.0.4
816

9-
## What's Changed
10-
1117
- refactor: updates chat and generation options by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/34
1218

1319
# 5.0.3
1420

15-
## What's Changed
16-
1721
- refactor: marks `images` as optional by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/32
1822
- feat: adds `doneReason` to chat and generation responses by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/33
1923

2024
# 5.0.2
2125

22-
## What's Changed
23-
2426
- feat: adds tool calling support by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/31
2527

2628
# 5.0.1
2729

28-
## What's Changed
29-
3030
- chore: changes minimum macOS version to 12 by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/30
3131

3232
# 5.0.0
3333

34-
## What's Changed
35-
3634
- refactor: removes Alamofire from `copyModel` by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/20
3735
- refactor: removes Alamofire from `deleteModel` by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/21
3836
- refactor: removes Alamofire from `embeddings` by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/22
@@ -46,14 +44,10 @@
4644

4745
# 4.1.0
4846

49-
## What's Changed
50-
5147
- refactor: changes type from `Double` to `Int` in `context` by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/19
5248

5349
# 4.0.0
5450

55-
## What's Changed
56-
5751
- chore: removes Playground by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/14
5852
- feat: adds initializer with default base URL by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/15
5953
- refactor: renames `generateEmbeddings` to `embeddings` by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/16
@@ -62,23 +56,17 @@
6256

6357
# 3.0.2
6458

65-
## What's Changed
66-
6759
- Added generateEmbeddings by @thrashr888 in https://github.com/kevinhermawan/OllamaKit/pull/11
6860
- Forward Alamofire failures by @malicious in https://github.com/kevinhermawan/OllamaKit/pull/12
6961

7062
# 3.0.1
7163

72-
## What's Changed
73-
7464
- refactor: migrates `chat` and `generate` from `Future` to `PassthroughSubject` by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/8
7565
- chore: moves `Documentation.md` by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/9
7666
- fix: `context` must be an array of integers by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/10
7767

7868
# 3.0.0
7969

80-
## What's Changed
81-
8270
- docs: improves the documentation by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/6
8371
- feat: adds reactive implementation for all APIs by @kevinhermawan in https://github.com/kevinhermawan/OllamaKit/pull/5
8472

[email protected]

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
// swift-tools-version: 5.9
2+
// The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+
import PackageDescription
5+
6+
let package = Package(
7+
name: "OllamaKit",
8+
platforms: [
9+
.iOS(.v15),
10+
.macOS(.v12),
11+
.macCatalyst(.v15)
12+
],
13+
products: [
14+
.library(
15+
name: "OllamaKit",
16+
targets: ["OllamaKit"]),
17+
],
18+
dependencies: [
19+
.package(url: "https://github.com/apple/swift-docc-plugin.git", .upToNextMajor(from: "1.3.0"))
20+
],
21+
targets: [
22+
.target(
23+
name: "OllamaKit",
24+
dependencies: []),
25+
.testTarget(
26+
name: "OllamaKitTests",
27+
dependencies: ["OllamaKit"]),
28+
]
29+
)

Playground/OKPlayground.xcodeproj/project.pbxproj

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
archiveVersion = 1;
44
classes = {
55
};
6-
objectVersion = 56;
6+
objectVersion = 60;
77
objects = {
88

99
/* Begin PBXBuildFile section */
10+
04A2EC422D22A513009C9AED /* ChatWithFormatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A2EC412D22A513009C9AED /* ChatWithFormatView.swift */; };
11+
04C1CC092D21E8B8005362B0 /* OllamaKit in Frameworks */ = {isa = PBXBuildFile; productRef = 04C1CC082D21E8B8005362B0 /* OllamaKit */; };
1012
0A5648C42C1468E0008FB5F6 /* OKPlaygroundApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A5648C32C1468E0008FB5F6 /* OKPlaygroundApp.swift */; };
1113
0A5648C82C1468E1008FB5F6 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0A5648C72C1468E1008FB5F6 /* Assets.xcassets */; };
1214
0A5648CB2C1468E1008FB5F6 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 0A5648CA2C1468E1008FB5F6 /* Preview Assets.xcassets */; };
@@ -21,9 +23,11 @@
2123
0A5648EA2C1504CD008FB5F6 /* GenerateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A5648E92C1504CD008FB5F6 /* GenerateView.swift */; };
2224
0A5648EE2C150C66008FB5F6 /* OllamaKit in Frameworks */ = {isa = PBXBuildFile; productRef = 0A5648ED2C150C66008FB5F6 /* OllamaKit */; };
2325
0A7B752D2C55E79400624336 /* ChatWithToolsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7B752C2C55E79400624336 /* ChatWithToolsView.swift */; };
26+
0AEA9B902CFCFD0100227D01 /* OllamaKit in Frameworks */ = {isa = PBXBuildFile; productRef = 0AEA9B8F2CFCFD0100227D01 /* OllamaKit */; };
2427
/* End PBXBuildFile section */
2528

2629
/* Begin PBXFileReference section */
30+
04A2EC412D22A513009C9AED /* ChatWithFormatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatWithFormatView.swift; sourceTree = "<group>"; };
2731
0A5648C02C1468E0008FB5F6 /* OKPlayground.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = OKPlayground.app; sourceTree = BUILT_PRODUCTS_DIR; };
2832
0A5648C32C1468E0008FB5F6 /* OKPlaygroundApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OKPlaygroundApp.swift; sourceTree = "<group>"; };
2933
0A5648C72C1468E1008FB5F6 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
@@ -47,6 +51,8 @@
4751
buildActionMask = 2147483647;
4852
files = (
4953
0A5648EE2C150C66008FB5F6 /* OllamaKit in Frameworks */,
54+
0AEA9B902CFCFD0100227D01 /* OllamaKit in Frameworks */,
55+
04C1CC092D21E8B8005362B0 /* OllamaKit in Frameworks */,
5056
);
5157
runOnlyForDeploymentPostprocessing = 0;
5258
};
@@ -102,6 +108,7 @@
102108
0A5648E72C14E00E008FB5F6 /* ChatView.swift */,
103109
0A5648E92C1504CD008FB5F6 /* GenerateView.swift */,
104110
0A7B752C2C55E79400624336 /* ChatWithToolsView.swift */,
111+
04A2EC412D22A513009C9AED /* ChatWithFormatView.swift */,
105112
);
106113
path = Views;
107114
sourceTree = "<group>";
@@ -148,6 +155,8 @@
148155
name = OKPlayground;
149156
packageProductDependencies = (
150157
0A5648ED2C150C66008FB5F6 /* OllamaKit */,
158+
0AEA9B8F2CFCFD0100227D01 /* OllamaKit */,
159+
04C1CC082D21E8B8005362B0 /* OllamaKit */,
151160
);
152161
productName = OKPlayground;
153162
productReference = 0A5648C02C1468E0008FB5F6 /* OKPlayground.app */;
@@ -178,6 +187,7 @@
178187
);
179188
mainGroup = 0A5648B72C1468E0008FB5F6;
180189
packageReferences = (
190+
04C1CC072D21E8B8005362B0 /* XCLocalSwiftPackageReference "../../OllamaKit" */,
181191
);
182192
productRefGroup = 0A5648C12C1468E0008FB5F6 /* Products */;
183193
projectDirPath = "";
@@ -216,6 +226,7 @@
216226
0A5648E42C14D342008FB5F6 /* ModelInfoView.swift in Sources */,
217227
0A5648E22C14C7E1008FB5F6 /* ViewModel.swift in Sources */,
218228
0A5648DF2C14C583008FB5F6 /* EmbeddingsView.swift in Sources */,
229+
04A2EC422D22A513009C9AED /* ChatWithFormatView.swift in Sources */,
219230
);
220231
runOnlyForDeploymentPostprocessing = 0;
221232
};
@@ -366,7 +377,7 @@
366377
PRODUCT_BUNDLE_IDENTIFIER = com.kevinhermawan.OKPlayground;
367378
PRODUCT_NAME = "$(TARGET_NAME)";
368379
SWIFT_EMIT_LOC_STRINGS = YES;
369-
SWIFT_VERSION = 5.0;
380+
SWIFT_VERSION = 6.0;
370381
TARGETED_DEVICE_FAMILY = "1,2";
371382
};
372383
name = Debug;
@@ -396,7 +407,7 @@
396407
PRODUCT_BUNDLE_IDENTIFIER = com.kevinhermawan.OKPlayground;
397408
PRODUCT_NAME = "$(TARGET_NAME)";
398409
SWIFT_EMIT_LOC_STRINGS = YES;
399-
SWIFT_VERSION = 5.0;
410+
SWIFT_VERSION = 6.0;
400411
TARGETED_DEVICE_FAMILY = "1,2";
401412
};
402413
name = Release;
@@ -424,11 +435,26 @@
424435
};
425436
/* End XCConfigurationList section */
426437

438+
/* Begin XCLocalSwiftPackageReference section */
439+
04C1CC072D21E8B8005362B0 /* XCLocalSwiftPackageReference "../../OllamaKit" */ = {
440+
isa = XCLocalSwiftPackageReference;
441+
relativePath = ../../OllamaKit;
442+
};
443+
/* End XCLocalSwiftPackageReference section */
444+
427445
/* Begin XCSwiftPackageProductDependency section */
446+
04C1CC082D21E8B8005362B0 /* OllamaKit */ = {
447+
isa = XCSwiftPackageProductDependency;
448+
productName = OllamaKit;
449+
};
428450
0A5648ED2C150C66008FB5F6 /* OllamaKit */ = {
429451
isa = XCSwiftPackageProductDependency;
430452
productName = OllamaKit;
431453
};
454+
0AEA9B8F2CFCFD0100227D01 /* OllamaKit */ = {
455+
isa = XCSwiftPackageProductDependency;
456+
productName = OllamaKit;
457+
};
432458
/* End XCSwiftPackageProductDependency section */
433459
};
434460
rootObject = 0A5648B82C1468E0008FB5F6 /* Project object */;

Playground/OKPlayground.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 0 additions & 23 deletions
This file was deleted.

Playground/OKPlayground/ViewModels/ViewModel.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import Foundation
99
import OllamaKit
1010

1111
@Observable
12+
@MainActor
1213
final class ViewModel {
1314
var ollamaKit = OllamaKit()
1415

Playground/OKPlayground/Views/AppView.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ struct AppView: View {
4444
NavigationLink("Chat with Tools") {
4545
ChatWithToolsView()
4646
}
47-
47+
48+
NavigationLink("Chat with Format") {
49+
ChatWithFormatView()
50+
}
51+
4852
NavigationLink("Generate") {
4953
GenerateView()
5054
}

0 commit comments

Comments
 (0)