Current section

Files

Jump to
liter_llm lib liter_llm tool_message.ex
Raw

lib/liter_llm/tool_message.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:633c6ca3d945229d202d1cc5029bc08f1583a5cc88cc0aaa95286a909df9c771
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule LiterLlm.ToolMessage do
@moduledoc "Tool execution result returned to the model."
@typedoc "Tool execution result returned to the model."
@type t :: %__MODULE__{
content: String.t() | nil,
tool_call_id: String.t() | nil,
name: String.t() | nil
}
defstruct content: nil,
tool_call_id: nil,
name: 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