mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-11 07:04:59 +00:00
undo
This commit is contained in:
parent
b0245d3930
commit
8e0f291a16
1 changed files with 9 additions and 0 deletions
|
@ -18,6 +18,15 @@ class Model:
|
|||
prompt_price = None
|
||||
completion_price = None
|
||||
|
||||
@classmethod
|
||||
def create(cls, name, client=None):
|
||||
from .openai import OpenAIModel
|
||||
from .openrouter import OpenRouterModel
|
||||
|
||||
if client and client.base_url.host == "openrouter.ai":
|
||||
return OpenRouterModel(client, name)
|
||||
return OpenAIModel(name)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue