Tinkex.Types.SupportedModel (Tinkex v0.3.4)

View Source

Metadata for a single supported model from the server capabilities response.

Fields

  • model_id - Short identifier (e.g., "llama-3-8b")
  • model_name - Full model path (e.g., "meta-llama/Meta-Llama-3-8B")
  • arch - Architecture type (e.g., "llama", "qwen2")

Example

iex> json = %{
...>   "model_id" => "llama-3-8b",
...>   "model_name" => "meta-llama/Meta-Llama-3-8B",
...>   "arch" => "llama"
...> }
iex> model = Tinkex.Types.SupportedModel.from_json(json)
iex> model.model_id
"llama-3-8b"
iex> model.arch
"llama"

Summary

Functions

Parse a supported model from JSON map with string or atom keys.

Types

t()

@type t() :: %Tinkex.Types.SupportedModel{
  arch: String.t() | nil,
  model_id: String.t() | nil,
  model_name: String.t() | nil
}

Functions

from_json(json)

@spec from_json(map() | String.t()) :: t()

Parse a supported model from JSON map with string or atom keys.

Falls back gracefully if given a plain string (treats as model_name). Unknown fields are ignored without error.