mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 17:55:01 +00:00
adding todo notes
This commit is contained in:
parent
22f3349862
commit
a39829c5f8
2 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,6 @@
|
|||
import importlib
|
||||
|
||||
saved_openai = None
|
||||
|
||||
|
||||
class Model:
|
||||
name = None
|
||||
edit_format = None
|
||||
|
|
|
@ -18,6 +18,7 @@ class OpenRouterModel(Model):
|
|||
# TODO: figure out proper encodings for non openai models
|
||||
self.tokenizer = tiktoken.get_encoding("cl100k_base")
|
||||
|
||||
# TODO cache the model list data to speed up using multiple models
|
||||
available_models = openai.Model.list().data
|
||||
found = next((details for details in available_models if details.get('id') == name), None)
|
||||
|
||||
|
@ -30,6 +31,7 @@ class OpenRouterModel(Model):
|
|||
raise ValueError(f'invalid openrouter model: {name}')
|
||||
|
||||
|
||||
# TODO run benchmarks and figure out which models support which edit-formats
|
||||
def edit_format_for_model(name):
|
||||
if any(str in name for str in ['gpt-4', 'claude-2']):
|
||||
return "diff"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue