mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-07 05:05:01 +00:00
feat: Add --junior-edit-format argument and plumb it into Model()
This commit is contained in:
parent
6d19abf7ec
commit
888d60d472
3 changed files with 17 additions and 2 deletions
|
@ -597,11 +597,12 @@ def get_model_info(model):
|
|||
|
||||
|
||||
class Model(ModelSettings):
|
||||
def __init__(self, model, weak_model=None, junior_model=None):
|
||||
def __init__(self, model, weak_model=None, junior_model=None, junior_edit_format=None):
|
||||
self.name = model
|
||||
self.max_chat_history_tokens = 1024
|
||||
self.weak_model = None
|
||||
self.junior_model = None
|
||||
self.junior_edit_format = junior_edit_format
|
||||
|
||||
self.info = self.get_model_info(model)
|
||||
|
||||
|
@ -716,6 +717,11 @@ class Model(ModelSettings):
|
|||
weak_model=False,
|
||||
junior_model=False,
|
||||
)
|
||||
|
||||
# Use the provided junior_edit_format if available, otherwise use the ModelSettings value
|
||||
if self.junior_edit_format is None:
|
||||
self.junior_edit_format = self.junior_edit_format or self.junior_model.edit_format
|
||||
|
||||
return self.junior_model
|
||||
|
||||
def tokenizer(self, text):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue