ModelsConfig class final

The parsed models: section: media slot overrides plus named custom model definitions. Mutable like CustomProviderRegistry — the REPL (/models set//models remove) updates the live instance and the executable persists it with the usual config save.

Constructors

ModelsConfig({Map<String, MediaSlotModelConfig>? slots, Map<String, CustomModelDefinition>? custom})
Creates an empty (or pre-populated) models config.
ModelsConfig.fromYaml(Object? node)
Parses the models: yaml node, strictly: the node must be a map with only slots/custom keys; slot names must come from mediaModelSlotIds; entry-level rules are in MediaSlotModelConfig.fromYaml and CustomModelDefinition.fromYaml.
factory

Properties

custom Map<String, CustomModelDefinition>
Named custom model definitions (/model <name> targets).
final
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
True when neither section carries an entry (the config file then omits the whole models: section on save).
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
slots Map<String, MediaSlotModelConfig>
Per-slot media overrides, keyed by mediaModelSlotIds name.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeSlotOverride(String slot) bool
Removes the override for slot; returns false when none was set.
setSlotOverride(String slot, MediaSlotModelConfig override) → void
Sets (or replaces) the override for slot, which must be one of mediaModelSlotIds.
toString() String
A string representation of this object.
inherited
toYaml() String
Serializes the models: section (only called when non-empty). Slots emit in mediaModelSlotIds declaration order; custom definitions in insertion order.

Operators

operator ==(Object other) bool
The equality operator.
inherited