mlboydaisuke commited on
Commit
2ed8452
Β·
verified Β·
1 Parent(s): 42577b8

gen-cards: regenerate Use-it block for CoreAIKit 0.8.0; the snippet puts the image before the question, as CoreAIKit 0.8.0's VLChat example does

Browse files
Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -40,7 +40,7 @@ Verified on **iPhone 17 Pro**: image β†’ grounded answer at **~51.5 tok/s** deco
40
  <!-- gen-cards:use-it begin id=minicpm-v-4.6 (managed by scripts/gen-cards β€” edit cards.json / QuickStart.swift, not this block) -->
41
  ## Use it
42
 
43
- **New to Core AI? [Start with CoreAIKit 0.7.3](https://github.com/john-rocky/coreai-kit#readme).** Follow its requirements and first-run steps for `qwen3-0.6b`, then open the same release's [ChatDemo](https://github.com/john-rocky/coreai-kit/tree/0.7.3/Examples/ChatDemo). The README records the tested OS/SDK and download size; model and device coverage is stated per example.
44
 
45
  ⚑ **One line** β€” run the kit's task op on this model
46
  (`import CoreAIOps`; no session, no model plumbing, downloads on first use):
@@ -49,13 +49,13 @@ Verified on **iPhone 17 Pro**: image β†’ grounded answer at **~51.5 tok/s** deco
49
  let caption = try await CoreAI.caption(imageAt: url, options: .model("minicpm-v-4.6"))
50
  ```
51
 
52
- Every op, one shape β€” [Cookbook](https://github.com/john-rocky/coreai-kit/blob/0.7.3/docs/COOKBOOK.md).
53
 
54
- ▢️ **Run it (source)** β€” the [VLChat runner](https://github.com/john-rocky/coreai-kit/tree/0.7.3/Examples/VLChat)
55
  (GUI + CLI, one app for every vision-language model in the catalog):
56
 
57
  ```bash
58
- git clone --branch 0.7.3 --depth 1 https://github.com/john-rocky/coreai-kit
59
  export DEVELOPER_DIR=/Applications/Xcode-27.0.0-RC.app/Contents/Developer
60
  open -a /Applications/Xcode-27.0.0-RC.app coreai-kit/Examples/VLChat/VLChat.xcodeproj
61
  # β†’ Run, then pick "MiniCPM-V 4.6" in the model picker
@@ -77,13 +77,13 @@ let vlm = try await KitVisionModel(catalog: "minicpm-v-4.6")
77
  let session = LanguageModelSession(model: vlm)
78
  let image = try ImageFile.load(imageURL) // any image file β†’ CGImage + EXIF orientation
79
  let reply = try await session.respond(to: Prompt {
 
80
  prompt
81
- Attachment(image.cgImage, orientation: image.orientation)
82
  })
83
  // reply.content: the answer about the image, generated fully on-device
84
  ```
85
 
86
- The take-home is [`Examples/VLChat/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/0.7.3/Examples/VLChat/Sources/QuickStart.swift)
87
  β€” this exact code as one typed function, no UI; the CLI is an argument shell over it, and
88
  the GUI drives the same `KitVisionModel(catalog:)` behind a `LanguageModelSession`.
89
  Multi-turn about the same image? Hold the `LanguageModelSession` and call `respond(to:)`
@@ -92,7 +92,7 @@ per turn. The photo picker / file chooser is your app's own chrome β€” `ImageFil
92
 
93
  **Integration checklist**
94
 
95
- - SPM: `https://github.com/john-rocky/coreai-kit` (exact **0.7.3**) β†’ product **CoreAIKit**
96
  - Info.plist: `NSPhotoLibraryUsageDescription` β€” only if you use PhotosPicker
97
  - Entitlements (iOS): `com.apple.developer.kernel.increased-memory-limit`
98
  - First run downloads the model β€” ~2,146 MB (Mac) / ~2,146 MB (iPhone) β€” then it loads from the
 
40
  <!-- gen-cards:use-it begin id=minicpm-v-4.6 (managed by scripts/gen-cards β€” edit cards.json / QuickStart.swift, not this block) -->
41
  ## Use it
42
 
43
+ **New to Core AI? [Start with CoreAIKit 0.8.0](https://github.com/john-rocky/coreai-kit#readme).** Follow its requirements and first-run steps for `qwen3-0.6b`, then open the same release's [ChatDemo](https://github.com/john-rocky/coreai-kit/tree/0.8.0/Examples/ChatDemo). The README records the tested OS/SDK and download size; model and device coverage is stated per example.
44
 
45
  ⚑ **One line** β€” run the kit's task op on this model
46
  (`import CoreAIOps`; no session, no model plumbing, downloads on first use):
 
49
  let caption = try await CoreAI.caption(imageAt: url, options: .model("minicpm-v-4.6"))
50
  ```
51
 
52
+ Every op, one shape β€” [Cookbook](https://github.com/john-rocky/coreai-kit/blob/0.8.0/docs/COOKBOOK.md).
53
 
54
+ ▢️ **Run it (source)** β€” the [VLChat runner](https://github.com/john-rocky/coreai-kit/tree/0.8.0/Examples/VLChat)
55
  (GUI + CLI, one app for every vision-language model in the catalog):
56
 
57
  ```bash
58
+ git clone --branch 0.8.0 --depth 1 https://github.com/john-rocky/coreai-kit
59
  export DEVELOPER_DIR=/Applications/Xcode-27.0.0-RC.app/Contents/Developer
60
  open -a /Applications/Xcode-27.0.0-RC.app coreai-kit/Examples/VLChat/VLChat.xcodeproj
61
  # β†’ Run, then pick "MiniCPM-V 4.6" in the model picker
 
77
  let session = LanguageModelSession(model: vlm)
78
  let image = try ImageFile.load(imageURL) // any image file β†’ CGImage + EXIF orientation
79
  let reply = try await session.respond(to: Prompt {
80
+ Attachment(image.cgImage, orientation: image.orientation) // the image, then the question
81
  prompt
 
82
  })
83
  // reply.content: the answer about the image, generated fully on-device
84
  ```
85
 
86
+ The take-home is [`Examples/VLChat/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/0.8.0/Examples/VLChat/Sources/QuickStart.swift)
87
  β€” this exact code as one typed function, no UI; the CLI is an argument shell over it, and
88
  the GUI drives the same `KitVisionModel(catalog:)` behind a `LanguageModelSession`.
89
  Multi-turn about the same image? Hold the `LanguageModelSession` and call `respond(to:)`
 
92
 
93
  **Integration checklist**
94
 
95
+ - SPM: `https://github.com/john-rocky/coreai-kit` (exact **0.8.0**) β†’ product **CoreAIKit**
96
  - Info.plist: `NSPhotoLibraryUsageDescription` β€” only if you use PhotosPicker
97
  - Entitlements (iOS): `com.apple.developer.kernel.increased-memory-limit`
98
  - First run downloads the model β€” ~2,146 MB (Mac) / ~2,146 MB (iPhone) β€” then it loads from the