doctor library
The host doctor of local_inference, for tools only (it uses dart:io and dart:ffi): it checks an app or package against what the packages need and cannot set themselves (the hooks block, the pinned versions, how the packages are listed, the llama.cpp bundles, and the iOS, Android and macOS settings of the host), and says for each check what it found and how to fix it.
From a host: dart run local_inference:doctor (or local_inference_flutter:doctor in a Flutter app); --help
lists the options.
Classes
- CheckResult
- What one check found.
- Doctor
-
Checks a host app or package against what the local_inference packages need. It reads files only: it runs no tool,
uses no network and changes nothing. (
dart runruns the build hooks of the package that holds the doctor before the doctor starts: see doctorUsage.) - DoctorReport
- The report of one run of the doctor.
- NativeManifest
-
The manifest: the SHA-256 of every release archive and of every file it unpacks to, by path relative to the
folder
llamadart_native_pathpoints at (<bundle>/<archive>,<bundle>/extracted/<file>), plus the guard fileextracted/target-bundle-not-vendored.so.
Enums
- CheckStatus
- The outcome of one check.
Constants
-
doctorChecks
→ const Map<
String, DoctorCheck> - The checks, in report order, by id.
Functions
-
doctorUsage(
[String command = 'local_inference:doctor']) → String -
The help text of the command line;
commandis how it was started. -
runDoctor(
List< String> args, {StringSink? out, StringSink? err, Map<String, String> ? environment, NativeManifest? manifest, String? machineBundle, String command = 'local_inference:doctor'}) → int -
Runs the doctor for the command line
argsand returns the exit status (see doctorUsage). The report goes toout(stdout by default), usage errors toerr(stderr).environment,manifestandmachineBundlereplace the process environment, the embedded manifest and this computer's bundle (for tests).