Current section

Files

Jump to
liter_llm lib liter_llm stream_tool_call.ex
Raw

lib/liter_llm/stream_tool_call.ex

# This file is auto-generated by alef — DO NOT EDIT.
# alef:hash:b34f5dac0a6af082b71cab3b75e126050fd38402a73d6d3ff06130b6fe7d8875
# To regenerate: alef generate
# To verify freshness: alef verify --exit-code
defmodule LiterLlm.StreamToolCall do
@moduledoc "A streaming tool call being built incrementally."
@typedoc "A streaming tool call being built incrementally."
@type t :: %__MODULE__{
index: non_neg_integer(),
id: String.t() | nil,
call_type: String.t() | nil | nil,
function: LiterLlm.StreamFunctionCall.t() | nil
}
defstruct index: 0,
id: nil,
call_type: nil,
function: 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