Extra Models
Extra Models
These are advanced "meta-models" that combine or modify the behavior of other models.
minisweagent.models.extra.roulette
RouletteModelConfig
dataclass
RouletteModelConfig(
model_kwargs: list[dict], model_name: str = "roulette"
)
model_kwargs
instance-attribute
model_kwargs: list[dict]
The models to choose from
model_name
class-attribute
instance-attribute
model_name: str = 'roulette'
RouletteModel
RouletteModel(
*,
config_class: Callable = RouletteModelConfig,
**kwargs,
)
This "meta"-model randomly selects one of the models at every call
Source code in src/minisweagent/models/extra/roulette.py
17 18 19 20 | |
config
instance-attribute
config = config_class(**kwargs)
cost
property
cost: float
n_calls
property
n_calls: int
get_template_vars
get_template_vars() -> dict
Source code in src/minisweagent/models/extra/roulette.py
30 31 | |
select_model
select_model() -> Model
Source code in src/minisweagent/models/extra/roulette.py
33 34 | |
query
query(*args, **kwargs) -> dict
Source code in src/minisweagent/models/extra/roulette.py
36 37 38 39 40 | |
InterleavingModelConfig
dataclass
InterleavingModelConfig(
model_kwargs: list[dict],
sequence: list[int] | None = None,
model_name: str = "interleaving",
)
model_kwargs
instance-attribute
model_kwargs: list[dict]
sequence
class-attribute
instance-attribute
sequence: list[int] | None = None
If set to 0, 0, 1, we will return the first model 2 times, then the second model 1 time, then the first model again, etc.
model_name
class-attribute
instance-attribute
model_name: str = 'interleaving'
InterleavingModel
InterleavingModel(
*,
config_class: Callable = InterleavingModelConfig,
**kwargs,
)
Bases: RouletteModel
This "meta"-model alternates between the models in the sequence for every call
Source code in src/minisweagent/models/extra/roulette.py
53 54 55 | |
select_model
select_model() -> Model
Source code in src/minisweagent/models/extra/roulette.py
57 58 59 60 61 62 | |