Current section
Files
Jump to
Current section
Files
lib/xberg/ner_config.ex
# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:b2c29ab80fb9cdb8c5190a7808ad862ad890f416ad887092447b282a5b1b69e0
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.NerConfig do
@moduledoc "Configuration for the NER post-processor."
@typedoc "Configuration for the NER post-processor."
@type t :: %__MODULE__{
backend: String.t() | nil,
categories: [String.t() | nil],
model: String.t() | nil,
llm: Xberg.LlmConfig.t() | nil,
custom_labels: [String.t()]
}
defstruct backend: :onnx,
categories: [],
model: nil,
llm: nil,
custom_labels: []
defimpl Jason.Encoder do
@doc false
def encode(value, opts) do
value
|> Map.from_struct()
|> Enum.reject(fn {_k, v} -> v == nil end)
|> Enum.into(%{})
|> Jason.Encoder.encode(opts)
end
end
end