getEmbedding method

Future<Float32List> getEmbedding(
  1. List<int> tokens
)

Implementation

Future<Float32List> getEmbedding(List<int> tokens) async {
  final snapshot = List<int>.unmodifiable(tokens);
  await _onnxIsolateManager.start(OnnxIsolateType.minishLab);
  return _onnxIsolateManager.sendInference(modelPath, snapshot);
}