Backends
The offline rule pipeline always runs first. Optional backends can rewrite further.
rule (default)
Zero dependencies. Bundled vocabulary + sentence formation. Best for serverless.
from vaakly import Vaakly
Vaakly(backend="rule").polish("there is many bugs")
onnx (local)
pip install vaakly[onnx]. Model must exist on disk — no runtime download.
v = Vaakly(
backend="onnx",
onnx={"model_path": "/models/vaakly-coherence.onnx", "fail_open": True},
)
See ONNX contract.
http (OpenAI-compatible)
pip install vaakly[http]. API key from environment only. Redact first.
v = Vaakly(
backend="http",
http={
"base_url": "https://api.example.com/v1",
"model": "your-slm",
"api_key_env": "VAAKLY_API_KEY",
"fail_open": True,
},
)
Fail-open
fail_open |
Behavior |
|---|---|
True (default) |
Use rule draft; append Result.warnings |
False |
Raise BackendError |