/** * Demonstrates `stopReason` on `CompletionFinal`. * * `completion()` sets `stopReason` on the aggregated `final` promise to * indicate why the model stopped generating: * * - `undefined` — natural end-of-sequence (EOS). The model finished on * its own. This is the common case and the backwards- * compatible default. * - `"length"` — the `predict` token budget was exhausted. Output is * truncated; the model did not reach a natural stopping * point. * - `"cancelled"` — the request was cancelled via `cancel({ requestId })`. * See `cancel-by-request-id.ts` for the full cancel flow. * * This example shows the two non-cancel cases back-to-back on the same model: * * 1. Natural EOS — no `generationParams`, model stops on its own. * 2. Budget hit — `predict: 10` forces truncation mid-output. * * The same `stopReason` is also available on the terminal `completionDone` * event in the `events` stream. */ export {}; //# sourceMappingURL=completion-stop-reason.d.ts.map