# `Tinkex.Types.GetSamplerResponse`
[🔗](https://github.com/North-Shore-AI/tinkex/blob/v0.4.0/lib/tinkex/types/get_sampler_response.ex#L1)

Response from the get_sampler API call.

Mirrors Python `tinker.types.GetSamplerResponse`.

## Fields

- `sampler_id` - The sampler ID (sampling_session_id)
- `base_model` - The base model name
- `model_path` - Optional tinker:// path to custom weights

## Wire Format

```json
{
  "sampler_id": "session-id:sample:0",
  "base_model": "Qwen/Qwen2.5-7B",
  "model_path": "tinker://run-id/weights/checkpoint-001"
}
```

## Examples

    iex> json = %{"sampler_id" => "sess:sample:0", "base_model" => "Qwen/Qwen2.5-7B"}
    iex> Tinkex.Types.GetSamplerResponse.from_json(json)
    %Tinkex.Types.GetSamplerResponse{sampler_id: "sess:sample:0", base_model: "Qwen/Qwen2.5-7B", model_path: nil}

## See Also

- `Tinkex.API.Rest.get_sampler/2`

# `t`

```elixir
@type t() :: %Tinkex.Types.GetSamplerResponse{
  base_model: String.t(),
  model_path: String.t() | nil,
  sampler_id: String.t()
}
```

# `from_json`

```elixir
@spec from_json(map()) :: t()
```

Create a GetSamplerResponse from a JSON map.

Handles both string and atom keys.

## Parameters

- `json` - Map with keys `"sampler_id"`/`:sampler_id`, `"base_model"`/`:base_model`,
  and optionally `"model_path"`/`:model_path`

## Examples

    iex> GetSamplerResponse.from_json(%{"sampler_id" => "s1", "base_model" => "Qwen", "model_path" => "tinker://..."})
    %GetSamplerResponse{sampler_id: "s1", base_model: "Qwen", model_path: "tinker://..."}

    iex> GetSamplerResponse.from_json(%{sampler_id: "s1", base_model: "Qwen"})
    %GetSamplerResponse{sampler_id: "s1", base_model: "Qwen", model_path: nil}

---

*Consult [api-reference.md](api-reference.md) for complete listing*
