Current section

Files

Jump to
liter_llm lib liter_llm batch_request_counts.ex
Raw

lib/liter_llm/batch_request_counts.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:0c694843abf5c6a9fc8b410dfa73aea7c94ee538a40dc746dd72c50e7c986f97
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule LiterLlm.BatchRequestCounts do
@moduledoc "Request processing counts for a batch."
@typedoc "Request processing counts for a batch."
@type t :: %__MODULE__{
total: non_neg_integer(),
completed: non_neg_integer(),
failed: non_neg_integer()
}
defstruct total: 0,
completed: 0,
failed: 0
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