AvailableModel
Object Hierarchy:
Description:
public class AvailableModel : Object, Serializable
Represents an available model from the Ollama models cache.
NOTE: This class is technically Ollama-specific, but is kept generic for potential future use with other model providers.
Format: { "name": "gemma3", "description": "...", "tags": ["1b", "4b", ...] }
Content:
Properties:
- public string description { get; set; }
Model description
- public string display { owned get; }
Formatted display string: "name - description" (e.g., "gemma3 - The
current, most capable model...").
- public int64 downloads { get; set; }
Total number of downloads
- public ArrayList<string> features { get; set; }
Array of model features (e.g., ["embedding", "vision"])
- public string list_markup { owned get; }
Pango markup string for displaying in the model list. Includes name,
description, sizes, features, and downloads.
- public string name { get; set; }
Model name (e.g., "gemma3", "qwen3")
- public ArrayList<ModelTag> tag_objects { get; }
Array of ModelTag objects parsed from tags array
- public ArrayList<string> tags { get; set; }
Array of model tags (can be strings or ModelTag objects)
- public ArrayList<string> unique_sizes { get; }
Array of unique size display strings with context (e.g., ["7b (25GB -
context 12K)", "34b (70GB - context 128K)"]). Computed when tags are loaded.
Creation methods:
Methods:
- public override bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Node property_node)
- public string? find_largest_tag_below (double max_size_b)
Finds the largest tag that is less than the specified size (in
billions). Returns null if no such tag exists.
- public double parse_tag_size (string tag)
Parses a tag string to extract the numeric size in billions. Returns -
1 if the tag cannot be parsed.
- public override Node serialize_property (string property_name, Value value, ParamSpec pspec)
Inherited Members:
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Json.Serializable
- default_deserialize_property
- default_serialize_property
- deserialize_property
- find_property
- get_property
- list_properties
- serialize_property
- set_property