Skip to main content
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 if model is 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) – Opens agrag.extraction.gliner and agrag.extraction.model_load spans. None opens no recorded span.

extract​

extract(chunk:Chunk, schema:GraphSchema) -> ExtractionResult

Extract with the local GLiNER2.5 model.

Raises:

model_name​

model_name = model_name