On Linux the Glint plugin always built in mock mode: meson found the ONNX
Runtime headers but its find_library('onnxruntime') looked in a libdir
taken from the already-normalized dependency, found nothing, and dropped
YAMS_USE_ONNX_RUNTIME, so GLiNER never ran (the v0.20.3 deb's glint has
no ONNX Runtime dependency either). On macOS it linked Homebrew's copy
directly.
Glint now uses the shared ONNX Runtime loader like the ONNX plugin: it
compiles against the headers only (ORT_API_MANUAL_INIT through
ort_cxx_api_wrapper.h), and before creating the session it resolves a
runtime with the same system-first, bundled-fallback policy. If none is
available the session reports "ONNX Runtime unavailable: ..." and entity
extraction is disabled instead of silently running the mock. Plugin
health gains an onnx_runtime object (available, source, version, path or
error), and [plugins.glint] runtime_library pins a copy.
Verified on grim (Linux, release, staged tree in a clean debian:testing
container): "Glint plugin: ONNX Runtime enabled (loaded at runtime)" at
configure, "[Glint] Loaded ONNX model with 6 inputs, 5 outputs" at run
time, and the daemon's title+NL stage extracts entities ("nl=5" for a
document naming people, companies, a place and a date).
Signed-off-by: trvon <me@trevon.dev>
|
||
|---|---|---|
| .. | ||
| gliner_session.cpp | ||
| gliner_session.h | ||
| meson.build | ||
| plugin.cpp | ||
| README.md | ||
Glint Plugin
GLiNER-based natural language entity extraction for YAMS.
Interface
entity_extractor_v2 (v2) - see include/yams/plugins/entity_extractor_v2.h
Supported Content
text/plaintext/markdownapplication/json
Entity Types
person, organization, location, date, event, product, technology, concept
Build
meson compile -C build/debug
# Output: build/debug/plugins/glint/yams_glint.{dylib,so,dll}
Environment
YAMS_GLINT_MODEL_PATH- ONNX model directoryYAMS_GLINT_THRESHOLD- Confidence threshold (default: 0.5)