Model Utilities
Convenience functions for selecting and configuring models.
minisweagent.models.get_model
get_model(
input_model_name: str | None = None,
config: dict | None = None,
) -> Model
Get an initialized model object from any kind of user input or settings.
Source code in src/minisweagent/models/__init__.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
minisweagent.models.get_model_name
get_model_name(
input_model_name: str | None = None,
config: dict | None = None,
) -> str
Get a model name from any kind of user input or settings.
Source code in src/minisweagent/models/__init__.py
61 62 63 64 65 66 67 68 69 70 71 |
|
minisweagent.models.get_model_class
get_model_class(
model_name: str, model_class: str = ""
) -> type
Select the best model class.
If a model_class is provided (as shortcut name, or as full import path,
e.g., "anthropic" or "minisweagent.models.anthropic.AnthropicModel"),
it takes precedence over the model_name
.
Otherwise, the model_name is used to select the best model class.
Source code in src/minisweagent/models/__init__.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|