Current section

Files

Jump to
xberg lib xberg summarization_config.ex
Raw

lib/xberg/summarization_config.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:27b14662489dbd72bffe76d749cce63acd51fb05b9d0eea856452c7d4c92c223
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule Xberg.SummarizationConfig do
@moduledoc "Configuration for the summarisation post-processor."
@typedoc "Configuration for the summarisation post-processor."
@type t :: %__MODULE__{
strategy: String.t() | nil,
max_tokens: non_neg_integer() | nil,
llm: Xberg.LlmConfig.t() | nil
}
defstruct strategy: :extractive,
max_tokens: nil,
llm: nil
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