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:94a7bbc4a09b4328c336a9f2e5dab5e392956991797d21483e17873edb792a19
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
# Issues & docs: https://github.com/kreuzberg-dev/alef
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