Skip to content

backend

diapason.evals.core.backend

Abstract base class for inference backends.

InferenceBackend

Bases: ABC

Base class for all inference backends used in evaluation.

framework_commit_value property

Default: empty (subclasses override). Used by runner.py error paths.

close()

Release resources.

generate(prompt, *, model, system='', temperature=0.0, max_tokens=2048) abstractmethod

Generate a response and return just the text content.

generate_full(prompt, *, model, system='', temperature=0.0, max_tokens=2048) abstractmethod

Generate a response and return full details.

Returns dict with keys: content, usage, model, latency_seconds, cost_usd.