Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

docs(guide): fix misattached clauses, duplicated paragraph and tense

Ash0fedfda4feb0
diff --git a/docs/cli-mcp.md b/docs/cli-mcp.md
index f1c2f6d5..b09d5588 100644
--- a/docs/cli-mcp.md
+++ b/docs/cli-mcp.md
@@ -158,7 +158,7 @@ Laya does not open a network port.
| `laya_decide` | Answers a JSON-schema-shaped decision in one forward pass and returns the decided values with per-field confidence, instead of an answer map to parse. Schema properties may be enum choices, booleans, or integers with a minimum and maximum; free strings, arrays, and nested objects are rejected by path. | `state`, `schema`, optional `model` |
The three batch and schema tools exist because the same operations are available on the SDK and
-`laya-serve`: reaching for many requests, or for a caller that already knows the answer shape,
+`laya-serve`: handling many requests, or serving a caller that already knows the answer shape,
does not require dropping to Python. For the schema-driven form in more depth, see
[Schema-driven decisions](structured.md).
diff --git a/docs/crewai.md b/docs/crewai.md
index da66f11f..0fdbb7c1 100644
--- a/docs/crewai.md
+++ b/docs/crewai.md
@@ -159,7 +159,7 @@ to their own agent; both repeats gave the same count.
| Tasks on their own agent | 2/59 | 7/59 | 16/59 |
| Median ms per task | 146 | 190 | 265 |
-Before this, the same run could not be asked at all: `LayaCrewRouter.__init__() got an unexpected
+Before this, the same run could not be made at all: `LayaCrewRouter.__init__() got an unexpected
keyword argument 'max_len'`.
Absolute accuracy is not the claim here -- the checkpoint is not a MASSIVE classifier and 59 similar
diff --git a/docs/evals.md b/docs/evals.md
index 7a5ada2c..fd5ab7de 100644
--- a/docs/evals.md
+++ b/docs/evals.md
@@ -90,7 +90,7 @@ short name like `english`, since there is no Router on this path (default
whose `model` field names a different one fails with a clear error rather than being silently
answered by the wrong model; `--device` does not apply. `--batch-size` uses the agent's batch
API when it has one and falls back to one call per state otherwise; `--sort-by-length` is forwarded
-to that batch API, which the per-state fallback has no group to reorder. Pass `--calibration PATH`
+to that batch API; the per-state fallback has no group to reorder. Pass `--calibration PATH`
to load a fitted calibration map onto `ONNXAgent`, so calibration gates such as `--max-ece`
evaluate against calibrated probabilities. The report's `config` block records the `onnx` path
and `calibration` path (when set).
diff --git a/docs/hooks/errors.md b/docs/hooks/errors.md
index 4782077c..b23f5e1b 100644
--- a/docs/hooks/errors.md
+++ b/docs/hooks/errors.md
@@ -146,7 +146,7 @@ One honest caveat: Python cannot interrupt a thread, so a timed-out hook keeps r
background. The timeout bounds how long the request waits, not how long the hook lives. Use it to
keep a served request responsive, not to reclaim the work. For a hook that can hang, also give the
underlying call its own timeout (a socket or HTTP timeout). Because the thread cannot be
-reclaimed, a hook that hangs on every call grows threads one per call; give a hook that can hang
+reclaimed, a hook that hangs on every call grows one thread per call; give a hook that can hang
its own bound rather than relying on `hooks_timeout` to stop it.
For an async hook, the coroutine runs on the event loop; a timeout on the calling side still
diff --git a/docs/hooks/lifecycle.md b/docs/hooks/lifecycle.md
index a4a11287..293ca650 100644
--- a/docs/hooks/lifecycle.md
+++ b/docs/hooks/lifecycle.md
@@ -142,7 +142,7 @@ Key points:
- Every start hook of a checkpoint's requests runs before any of their end hooks, because they
share forward passes. A cache that fills in `on_predict_end` therefore cannot serve a duplicate
state within the same checkpoint group; it can across calls.
-- For the same reason the requests end in reverse of the order they started, so a hook that sets
+- For the same reason the requests end in the reverse of the order they started, so a hook that sets
something in start and resets it in end (a `contextvars` value, an OpenTelemetry
`context.attach` / `detach`) unwinds to the value it found.
- A start hook that replaces `ctx.states`, `ctx.questions` or the token budget changes its own
diff --git a/docs/hooks/patterns.md b/docs/hooks/patterns.md
index d04074c7..77a0700f 100644
--- a/docs/hooks/patterns.md
+++ b/docs/hooks/patterns.md
@@ -281,7 +281,7 @@ or quietly makes the call worse:
* A start hook's `ctx.head_max_len` *replaces* the budget for the call. What is in force before it
is the caller's own per-call value, or the checkpoint default in `ctx.agent.cfg` -- so compare
- against that, and writing a plain number can lower the budget a caller already set.
+ against that: writing a plain number can lower the budget a caller already set.
* One call answers every question it carries, so size on the widest of them rather than on
whichever happens to come first.
* Once the options no longer fit the head, `laya/common.py` gives each of them
diff --git a/docs/security.md b/docs/security.md
index 43003f96..157bcb41 100644
--- a/docs/security.md
+++ b/docs/security.md
@@ -173,9 +173,6 @@ docker compose -f compose.yaml -f compose.http.yaml up laya-serve
There is no `_FILE` variant of this variable: that indirection exists for secrets, and a digest map
is not one.
-An unset or empty variable means no verification, so this is safe to leave out of environments that
-do not need it. Malformed JSON raises rather than silently skipping the check.
-
**Name each checkpoint when a process loads more than one.** The variable takes two shapes, and the
value types say which:
diff --git a/docs/use-cases.md b/docs/use-cases.md
index fe5c5a76..3757bcb8 100644
--- a/docs/use-cases.md
+++ b/docs/use-cases.md
@@ -90,8 +90,8 @@ def route_request(user_prompt: str):
Conversational voice agents (WebRTC, telephony) operate under strict turn-taking constraints: delays in
detecting when a user speaks or interrupts create unnatural conversational dead air. Waiting for a full
-generative model to produce its first token introduces avoidable lag when the caller simply acknowledged or
-interrupted.
+generative model to produce its first token introduces avoidable lag when the caller simply acknowledges or
+interrupts.
Laya can be placed directly after Speech-to-Text (STT) transcription to classify conversational flow and
user intent in a single forward pass: triggering quick filler audio or halting audio playback immediately