Current section

Files

Jump to
liter_llm lib liter_llm document_content.ex
Raw

lib/liter_llm/document_content.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:718a9bb2066b4d98f177745b5c3db63c834a58163b5677360c01f624add6c233
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule LiterLlm.DocumentContent do
@moduledoc "PDF/document content part for vision-capable models."
@typedoc "PDF/document content part for vision-capable models."
@type t :: %__MODULE__{
data: String.t() | nil,
media_type: String.t() | nil
}
defstruct data: nil,
media_type: 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