You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(leap-sdk): bump SDK page version pins + exhaustive MessageResponse switches
Two related changes across the remaining SDK pages:
1. Version pins bumped 0.10.7 → 0.10.8 — every `ai.liquid.leap:*` Gradle
coordinate, SPM `from: "0.10.7"`, `nativelibs` plugin version, the
`gradle/libs.versions.toml` snippet, Maven `<version>` block,
XCFramework binary-target URLs, and `*-natives@zip` classifier
coordinates. Quick-start's XCFramework SHA-256 values were replaced
with `<copy from the v0.10.8 release page>` placeholders since the
v0.10.8 GitHub release wasn't live when these were drafted; a
follow-up pass needs to drop in the real checksums.
2. Every Kotlin `when (response)` over `MessageResponse` and every Swift
`switch onEnum(of: response)` that previously used an `else -> {}` /
`else -> Unit` / `default: break` fallback was expanded into explicit
arms covering all six `MessageResponse` subtypes (`Chunk`,
`ReasoningChunk`, `FunctionCalls`, `AudioSample`, `Complete`, and the
new `Error` case from v0.10.8). Rationale: the example code is what
readers copy into their apps; under v0.10.8 a fallback-based pattern
silently swallows the new `Error` arm on Kotlin (statement-`when`
compiles with a warning, expression-`when` won't) and on Swift the
compiler enforces exhaustiveness, so call sites stop compiling.
Showing the explicit `.error` arm in every example puts the
migration path right next to the surrounding code.
Per-file detail:
- `quick-start.mdx` — bump every dependency pin; XCFramework
binary-target SHA-256s replaced with placeholders; iOS Swift
streaming example gains `case .error(let err)` arm; Android Kotlin
`when` gains `is MessageResponse.Error -> _errorMessage.value = ...`
arm; Kotlin/Native quick-start `when` expanded from 2-arm + `else`
to 6 explicit arms with `Error → System.err.println(...)`.
- `ai-agent-usage-guide.mdx` — first handler example: Swift `switch
onEnum(of:)` gains `case .error(let err): log(...)`; Kotlin `when`
gains `is MessageResponse.Error -> Log.e(...)`. ChatViewModel example:
same treatment, Kotlin path writes to `_errorMessage` so SwiftUI /
Compose can surface it. Agent-loop example: Swift `default: break`
replaced with `case .reasoningChunk, .audioSample: break` +
`case .error(let err): throw NSError(...)`; Kotlin `else -> {}`
replaced with explicit no-op arms plus
`is MessageResponse.Error -> throw response.throwable`.
- `function-calling.mdx` — Swift exhaustive case-list gains `.error`
arm; Kotlin `when` expanded with explicit `ReasoningChunk` /
`AudioSample` no-ops plus `Error → Log.e(...)`.
- `cloud-ai-comparison.mdx` — Swift case-list gains `.error` arm
surfacing via `print(...)`; Kotlin `when` expanded to 6 arms.
- `voice-assistant.mdx` — bump SPM `from:` and Gradle pins; bump
"stable release notes through v0.10.7" → "through v0.10.8"; Swift
audio-streaming `switch` gains `case .error(let err): throw
NSError(...)` so the surrounding `VoiceConversation` machinery
surfaces the failure; Kotlin `when` expanded with explicit no-op
arms plus `Error → throw response.throwable` matching the Swift
shape.
- `desktop-platforms.mdx` — bump every dependency pin, plugin
version, Maven `<version>`, natives-zip coords, and the XCFramework
binary-target URL; Kotlin K/N quick-start `when` expanded to 6
arms.
- `model-loading.mdx` — rewrite the "Sideloaded
`LiquidInferenceEngineOptions` (URL-based load)" callout from "does
NOT ship a Swift convenience init in v0.10.7" to "...through v0.10.8"
so the version stays accurate — v0.10.8's SKIE-on-openai-client
change didn't touch `LiquidInferenceEngineOptions`, so the all-12-
fields situation is unchanged.
**Building from macOS or Linux for Windows?** Kotlin/Native does not support cross-compiling to MinGW from a non-Windows host as of 2.3.20 — the build must run on Windows (native or in CI). GitHub Actions `windows-latest` works without extra setup.
@@ -316,7 +319,7 @@ Identical Swift API to iOS — same `ModelDownloader`, `Conversation`, `ChatMess
**Sideloaded `LiquidInferenceEngineOptions` (URL-based load).** The non-manifest variant does NOT ship a Swift convenience init in v0.10.7 — the K/N-generated designated init takes all 12 fields. Either build it fully (verbose) or use `loadSimpleModel(model: ModelSource(...))` on `ModelDownloader` (preferred for new code; see the Sideloaded files section). The builder `.with(...)` overloads exist but they create a new instance internally via the same 12-arg init, so you still need a fully-built starting instance — there is no `LiquidInferenceEngineOptions(bundlePath: …)` 1-arg form today.
530
+
**Sideloaded `LiquidInferenceEngineOptions` (URL-based load).** The non-manifest variant does NOT ship a Swift convenience init through v0.10.8 — the K/N-generated designated init takes all 12 fields. Either build it fully (verbose) or use `loadSimpleModel(model: ModelSource(...))` on `ModelDownloader` (preferred for new code; see the Sideloaded files section). The builder `.with(...)` overloads exist but they create a new instance internally via the same 12-arg init, so you still need a fully-built starting instance — there is no `LiquidInferenceEngineOptions(bundlePath: …)` 1-arg form today.
Copy file name to clipboardExpand all lines: deployment/on-device/sdk/quick-start.mdx
+30-22Lines changed: 30 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "Quick Start"
3
3
description: "Install the LEAP SDK on iOS, macOS, Android, JVM, Linux, or Windows — same API everywhere."
4
4
---
5
5
6
-
Latest version: `v0.10.7`
6
+
Latest version: `v0.10.8`
7
7
8
8
The Leap SDK is a Kotlin Multiplatform library: the same `ModelRunner` / `Conversation` / `MessageResponse` API runs on every supported target. The code differs only in **language** (Swift vs. Kotlin) and **packaging** (SPM, Gradle, or Kotlin/Native plugin) — the call shapes are identical. For background on what the SDK is and what first-class LFM support means in practice, see the [Overview](/deployment/on-device/sdk/overview).
9
9
@@ -68,7 +68,7 @@ The Leap SDK is a Kotlin Multiplatform library: the same `ModelRunner` / `Conver
68
68
69
69
1. In Xcode choose **File → Add Package Dependencies**.
70
70
2. Enter `https://github.com/Liquid4All/leap-sdk.git`.
71
-
3. Select the `0.10.7` release (or newer).
71
+
3. Select the `0.10.8` release (or newer).
72
72
4. Add the products you need to your app target.
73
73
74
74
The package vends five products. Most apps only need one or two:
@@ -94,7 +94,7 @@ The Leap SDK is a Kotlin Multiplatform library: the same `ModelRunner` / `Conver
94
94
</Info>
95
95
96
96
<Accordiontitle="Pin to explicit binary XCFrameworks">
97
-
For explicit pinning, declare each framework as a `.binaryTarget` in your `Package.swift`. The XCFramework assets live on the `Liquid4All/leap-sdk` v0.10.7 release page — copy the SHA-256 values from there.
97
+
For explicit pinning, declare each framework as a `.binaryTarget` in your `Package.swift`. The XCFramework assets live on the `Liquid4All/leap-sdk` v0.10.8 release page — copy the SHA-256 values from there.
98
98
99
99
<Warning>
100
100
The constrained-generation macros (`@Generatable`, `@Guide`) are Swift macros, not XCFrameworks — they ship as the `LeapSDKMacros` source target inside the SPM package and **cannot be installed as a `.binaryTarget`**. If you need them, use the standard SPM package URL above (or add the `LeapSDKMacros` source target separately on top of your binary targets).
@@ -103,23 +103,23 @@ The Leap SDK is a Kotlin Multiplatform library: the same `ModelRunner` / `Conver
0 commit comments