mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 09:14:59 +00:00
added adier/models.py
This commit is contained in:
parent
31c7274639
commit
587261ef12
1 changed files with 36 additions and 0 deletions
36
aider/models.py
Normal file
36
aider/models.py
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
class Model_GPT4_32k:
|
||||||
|
name = "gpt-4-32k"
|
||||||
|
max_context_tokens = 32 * 1024
|
||||||
|
|
||||||
|
|
||||||
|
GPT4_32k = Model_GPT4_32k()
|
||||||
|
|
||||||
|
|
||||||
|
class Model_GPT4:
|
||||||
|
name = "gpt-4"
|
||||||
|
max_context_tokens = 8 * 1024
|
||||||
|
|
||||||
|
|
||||||
|
GPT4 = Model_GPT4()
|
||||||
|
|
||||||
|
|
||||||
|
class Model_GPT35:
|
||||||
|
name = "gpt-3.5-turbo"
|
||||||
|
max_context_tokens = 4 * 1024
|
||||||
|
|
||||||
|
|
||||||
|
GPT35 = Model_GPT35()
|
||||||
|
|
||||||
|
|
||||||
|
def get_model(name):
|
||||||
|
models = [
|
||||||
|
GPT4_32k,
|
||||||
|
GPT4,
|
||||||
|
GPT35,
|
||||||
|
]
|
||||||
|
|
||||||
|
for model in models:
|
||||||
|
if model.name == name:
|
||||||
|
return model
|
||||||
|
|
||||||
|
raise ValueError(f"Unsupported model: {name}")
|
Loading…
Add table
Add a link
Reference in a new issue