Options
Object Hierarchy:
Description:
public class Options : Object, Serializable
Options object for Ollama API calls.
This is technically accessed through call.options (e.g., chatCall.options, embedCall.options). Contains all runtime parameters that can
be passed to Ollama API. Default values are -1 for numbers (indicating no value set) or empty string for strings.
Example
var call = new Call.Chat(client, "llama3.2");
call.options = new Call.Options() {
temperature = 0.7,
top_p = 0.9,
num_predict = 100
};
// Or modify existing options
call.options.temperature = 0.5;
call.options.stop = "\n\n";
Content:
Properties:
Creation methods:
Methods:
- public Options clone ()
Creates a clone of this Options object with all properties copied.
- public virtual bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Node property_node)
- public void fill_from_model (Model model)
Fills this Options object with values parsed from model parameters
string.
- public unowned ParamSpec? find_property (string name)
- public Value get_property (ParamSpec pspec)
- public bool has_values ()
Checks if any options have valid values set.
- public virtual Node serialize_property (string property_name, Value value, ParamSpec pspec)
- public void set_property (ParamSpec pspec, Value value)
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