Current section

Files

Jump to
liter_llm lib liter_llm json_schema_format.ex
Raw

lib/liter_llm/json_schema_format.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.JsonSchemaFormat do
@moduledoc "JSON Schema specification for constrained output."
@typedoc "JSON Schema specification for constrained output."
@type t :: %__MODULE__{
name: String.t() | nil,
description: String.t() | nil,
schema: String.t() | nil,
strict: boolean() | nil
}
defstruct name: nil,
description: nil,
schema: nil,
strict: 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