mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
feat: Inherit Model class from ModelSettings
This commit is contained in:
parent
427a83b075
commit
59bef7cb1c
1 changed files with 1 additions and 6 deletions
|
@ -424,13 +424,8 @@ MODEL_SETTINGS = [
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
class Model:
|
class Model(ModelSettings):
|
||||||
def __init__(self, model, weak_model=None):
|
def __init__(self, model, weak_model=None):
|
||||||
# Set defaults from ModelSettings
|
|
||||||
default_settings = ModelSettings(name="")
|
|
||||||
for field in fields(ModelSettings):
|
|
||||||
setattr(self, field.name, getattr(default_settings, field.name))
|
|
||||||
|
|
||||||
self.name = model
|
self.name = model
|
||||||
self.max_chat_history_tokens = 1024
|
self.max_chat_history_tokens = 1024
|
||||||
self.weak_model = None
|
self.weak_model = None
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue