Tinkex.Types.GetSamplerResponse (Tinkex v0.3.4)
View SourceResponse 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 namemodel_path- Optional tinker:// path to custom weights
Wire Format
{
"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
Summary
Functions
Create a GetSamplerResponse from a JSON map.
Types
Functions
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}