LeXtract.Error.External.TokenizerLoad exception (lextract v0.1.2)
View SourceError for tokenizer loading failures.
Raised when a tokenizer cannot be loaded from Hugging Face or when tokenizer initialization fails.
Examples
iex> error = LeXtract.Error.External.TokenizerLoad.exception(
...> reason: "network timeout"
...> )
iex> Exception.message(error)
"Failed to load tokenizer: network timeout"
iex> error = LeXtract.Error.External.TokenizerLoad.exception(
...> reason: "model not found",
...> model_identifier: "invalid-model"
...> )
iex> String.contains?(Exception.message(error), "invalid-model")
true
Summary
Functions
Create an Elixir.LeXtract.Error.External.TokenizerLoad without raising it.
Formats the error message for tokenizer loading failures.
Types
Functions
@spec exception(opts :: Keyword.t()) :: %LeXtract.Error.External.TokenizerLoad{ __exception__: true, bread_crumbs: term(), class: term(), model_identifier: term(), path: term(), reason: term(), splode: term(), stacktrace: term(), vars: term() }
Create an Elixir.LeXtract.Error.External.TokenizerLoad without raising it.
Keys
- :reason
- :model_identifier
Formats the error message for tokenizer loading failures.