added adier/models.py

This commit is contained in:
Paul Gauthier 2023-06-07 13:14:55 -07:00
parent 31c7274639
commit 587261ef12

36
aider/models.py Normal file
View 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}")