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:c7947a41084f71e69944233535fbeda5cd13b37144078f1895b6b57a7802d3fe
# 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