gen-cards: regenerate Use-it block
Browse files
README.md
CHANGED
|
@@ -40,6 +40,15 @@ iPhone** (Apple's `coreai-pipelined` engine + the zoo's engine patch stack).
|
|
| 40 |
<!-- gen-cards:use-it begin id=gemma-4-e2b (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
|
| 41 |
## Use it
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
▶️ **Run it (source)** — the [ChatDemo runner](https://github.com/john-rocky/coreai-kit/tree/main/Examples/ChatDemo)
|
| 44 |
(GUI + CLI, one app for every chat model in the catalog):
|
| 45 |
|
|
@@ -63,6 +72,8 @@ let reply = try await chat.respond(to: prompt)
|
|
| 63 |
// reply: the answer, generated fully on-device
|
| 64 |
```
|
| 65 |
|
|
|
|
|
|
|
| 66 |
The take-home is [`Examples/ChatDemo/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/main/Examples/ChatDemo/Sources/QuickStart.swift)
|
| 67 |
— this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 68 |
the GUI drives the same `ChatSession` across turns for its transcript.
|
|
|
|
| 40 |
<!-- gen-cards:use-it begin id=gemma-4-e2b (managed by scripts/gen-cards — edit cards.json / QuickStart.swift, not this block) -->
|
| 41 |
## Use it
|
| 42 |
|
| 43 |
+
⚡ **One line** — run the kit's task op on this model
|
| 44 |
+
(`import CoreAIOps`; no session, no model plumbing, downloads on first use):
|
| 45 |
+
|
| 46 |
+
```swift
|
| 47 |
+
let tldr = try await CoreAI.summarize(text, options: .model("gemma-4-e2b"))
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
Twenty ops, one shape — [Cookbook](https://github.com/john-rocky/coreai-kit/blob/main/docs/COOKBOOK.md).
|
| 51 |
+
|
| 52 |
▶️ **Run it (source)** — the [ChatDemo runner](https://github.com/john-rocky/coreai-kit/tree/main/Examples/ChatDemo)
|
| 53 |
(GUI + CLI, one app for every chat model in the catalog):
|
| 54 |
|
|
|
|
| 72 |
// reply: the answer, generated fully on-device
|
| 73 |
```
|
| 74 |
|
| 75 |
+
Also runs behind **Apple's FoundationModels API** — CoreAIKit's [`KitGemmaModel`](https://github.com/john-rocky/coreai-kit#works-with-apples-foundationmodels-api) plugs this bundle into the system `LanguageModelSession`; capabilities (tool calling, guided generation) auto-detect per model.
|
| 76 |
+
|
| 77 |
The take-home is [`Examples/ChatDemo/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/main/Examples/ChatDemo/Sources/QuickStart.swift)
|
| 78 |
— this exact code as one typed function, no UI; the CLI is an argument shell over it, and
|
| 79 |
the GUI drives the same `ChatSession` across turns for its transcript.
|