Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Add GPT4-turbo model (#252)

Zack Grannancbe091ac4fb8
diff --git a/sweagent/agent/models.py b/sweagent/agent/models.py
index ec42d771..128c72f9 100644
--- a/sweagent/agent/models.py
+++ b/sweagent/agent/models.py
@@ -201,6 +201,11 @@ class OpenAIModel(BaseModel):
"cost_per_input_token": 1e-05,
"cost_per_output_token": 3e-05,
},
+ "gpt-4-turbo-2024-04-09": {
+ "max_context": 128_000,
+ "cost_per_input_token": 1e-05,
+ "cost_per_output_token": 3e-05,
+ },
}
SHORTCUTS = {
@@ -210,6 +215,7 @@ class OpenAIModel(BaseModel):
"gpt4-legacy": "gpt-4-0613",
"gpt4-0125": "gpt-4-0125-preview",
"gpt3-0125": "gpt-3.5-turbo-0125",
+ "gpt4-turbo": "gpt-4-turbo-2024-04-09",
}
def __init__(self, args: ModelArguments, commands: list[Command]):