TextEmbedderOptions.fromAssetPath constructor

TextEmbedderOptions.fromAssetPath(
  1. String assetPath, {
  2. EmbedderOptions embedderOptions = const EmbedderOptions(),
})

Convenience constructor that looks for the model asset at the given file system location.

Implementation

factory TextEmbedderOptions.fromAssetPath(
  String assetPath, {
  EmbedderOptions embedderOptions = const EmbedderOptions(),
}) {
  return TextEmbedderOptions(
    baseOptions: BaseOptions.path(assetPath),
    embedderOptions: embedderOptions,
  );
}