Version: 0.0.4
agrag.ingestion.extract.GlinerExtractor
GlinerExtractor(*, model_name:str = 'fastino/gliner2.5-small-v1', model:object | None = None, tracer:Tracer | None = None) -> None
Bases: Extractor
Extracts locally with a GLiNER2.5 model. No network call.
Functions:
- extract – Extract with the local GLiNER2.5 model.
Attributes:
Parameters:
- model_name (
str) – The checkpoint to load ifmodelis not given. - model (
object | None) – An already-built GLiNER2.5 model. Tests inject a fake here to avoid a real model download. - tracer (
Tracer | None) – Opensagrag.extraction.glinerandagrag.extraction.model_loadspans.Noneopens no recorded span.
extract
extract(chunk:Chunk, schema:GraphSchema) -> ExtractionResult
Extract with the local GLiNER2.5 model.
Raises:
ExtractorMissingExtraError– Theextractpackage extra is not installed.ValueError–chunk.idisNone.
model_name
model_name = model_name