open method
Opens a new encoder, which the caller disposes. Throws a
WayfinderException with code model-missing or model-invalid when
the model cannot be used.
Implementation
@override
Future<WayfinderEncoder> open() => _guard(() async {
final embedder = await LlamaEmbedder.open(
modelFile: modelFile,
model: spec,
);
return WayfinderEncoder(embedder, embedder.countTokens, spec.maxTokens);
});