backend_mock: Mock backend for tests

View source: R/backend.R

backend_mockR Documentation

Mock backend for tests

Description

Returns deterministic scores derived from a digest::digest hash of the prompt. Never hits the network. Useful for unit tests and for package-development end-to-end runs without needing Ollama.

Usage

backend_mock(base = 50L)

Arguments

base

Baseline score (integer 0-100). Added to a small prompt-derived variation.

Value

A backend object.

Examples

b <- backend_mock()
b$score_record("any-model", "any prompt", temperature = 0)

screenllm documentation built on Sept. 24, 2026, 5:11 p.m.