gen-cards: regenerate Use-it block
Browse files
README.md
CHANGED
|
@@ -35,6 +35,56 @@ device.
|
|
| 35 |
> [`LICENSE`](LICENSE).
|
| 36 |
|
| 37 |
<!-- gen-cards:use-it begin id=s1-mini (managed by scripts/gen-cards β edit cards.json / QuickStart.swift, not this block) -->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
<!-- gen-cards:use-it end -->
|
| 39 |
|
| 40 |
## Contents
|
|
|
|
| 35 |
> [`LICENSE`](LICENSE).
|
| 36 |
|
| 37 |
<!-- gen-cards:use-it begin id=s1-mini (managed by scripts/gen-cards β edit cards.json / QuickStart.swift, not this block) -->
|
| 38 |
+
## Use it
|
| 39 |
+
|
| 40 |
+
β‘ **One line** β this model is the default behind the kit's task op
|
| 41 |
+
(`import CoreAIOps`; no session, no model plumbing, downloads on first use):
|
| 42 |
+
|
| 43 |
+
```swift
|
| 44 |
+
let clean = try await CoreAI.tidyTranscript(rawTranscript)
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
Twenty ops, one shape β [Cookbook](https://github.com/john-rocky/coreai-kit/blob/main/docs/COOKBOOK.md).
|
| 48 |
+
|
| 49 |
+
βΆοΈ **Run it (source)** β the [Tidy runner](https://github.com/john-rocky/coreai-kit/tree/main/Examples/Tidy)
|
| 50 |
+
(GUI + CLI, the three control axes as pickers):
|
| 51 |
+
|
| 52 |
+
```bash
|
| 53 |
+
git clone https://github.com/john-rocky/coreai-kit
|
| 54 |
+
open coreai-kit/Examples/Tidy/Tidy.xcodeproj
|
| 55 |
+
# β Run, then pick "S1-mini by Superwhisper" in the model picker
|
| 56 |
+
|
| 57 |
+
# agents / headless (macOS):
|
| 58 |
+
cd coreai-kit/Examples/Tidy
|
| 59 |
+
swift run tidy-cli --model s1-mini --text "so um i need to like send the the report by uh friday no wait make that thursday"
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
π» **Build with it** β complete; the glue is kit API, copy-paste runs:
|
| 63 |
+
|
| 64 |
+
```swift
|
| 65 |
+
import CoreAIKit
|
| 66 |
+
|
| 67 |
+
let tidier = try await KitTextNormalizer(catalog: "s1-mini")
|
| 68 |
+
// Long input is cut at word boundaries into ~450-token chunks and the rewrites stitched:
|
| 69 |
+
// on iPhone the engine caps prompt + generated at 1024 tokens, so a whole meeting
|
| 70 |
+
// transcript passed in one call would stop mid-sentence.
|
| 71 |
+
let result = try await tidier.normalize(transcript)
|
| 72 |
+
// result: the transcript as written text β English only; filler-only input returns ""
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
The take-home is [`Examples/Tidy/Sources/QuickStart.swift`](https://github.com/john-rocky/coreai-kit/blob/main/Examples/Tidy/Sources/QuickStart.swift)
|
| 76 |
+
β this exact code as one typed function, no UI; both the runner's GUI and its CLI call it.
|
| 77 |
+
Cleaning transcripts repeatedly? Keep the `KitTextNormalizer` loaded and call
|
| 78 |
+
`normalize(_:)` per transcript β the 796 MB load is what you are avoiding.
|
| 79 |
+
|
| 80 |
+
**Integration checklist**
|
| 81 |
+
|
| 82 |
+
- SPM: `https://github.com/john-rocky/coreai-kit` β product **CoreAIKit**
|
| 83 |
+
- Info.plist: none needed
|
| 84 |
+
- Entitlements: none needed
|
| 85 |
+
- First run downloads the model β 0.8 GB (Mac) / 0.8 GB (iPhone) β then it loads from the
|
| 86 |
+
local cache (Application Support; progress via the `downloadProgress` callback)
|
| 87 |
+
- Measure in Release β Debug is ~3Γ slower on per-token host work
|
| 88 |
<!-- gen-cards:use-it end -->
|
| 89 |
|
| 90 |
## Contents
|