mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
added 4o as default
This commit is contained in:
parent
b6cd852124
commit
bfba56c5f1
3 changed files with 29 additions and 4 deletions
|
@ -67,6 +67,14 @@ def get_parser(default_config_files, git_root):
|
|||
const=gpt_4_model,
|
||||
help=f"Use {gpt_4_model} model for the main chat",
|
||||
)
|
||||
gpt_4o_model = "openai/gpt-4o"
|
||||
group.add_argument(
|
||||
"--4o",
|
||||
action="store_const",
|
||||
dest="model",
|
||||
const=gpt_4o_model,
|
||||
help=f"Use {gpt_4o_model} model for the main chat",
|
||||
)
|
||||
gpt_4_turbo_model = "gpt-4-turbo"
|
||||
group.add_argument(
|
||||
"--4-turbo-vision",
|
||||
|
@ -155,7 +163,10 @@ def get_parser(default_config_files, git_root):
|
|||
"--max-chat-history-tokens",
|
||||
type=int,
|
||||
default=None,
|
||||
help="Maximum number of tokens to use for chat history. If not specified, uses the model's max_chat_history_tokens.",
|
||||
help=(
|
||||
"Maximum number of tokens to use for chat history. If not specified, uses the model's"
|
||||
" max_chat_history_tokens."
|
||||
),
|
||||
)
|
||||
default_env_file = os.path.join(git_root, ".env") if git_root else ".env"
|
||||
group.add_argument(
|
||||
|
|
|
@ -11,7 +11,7 @@ from PIL import Image
|
|||
from aider.dump import dump # noqa: F401
|
||||
from aider.litellm import litellm
|
||||
|
||||
DEFAULT_MODEL_NAME = "gpt-4-1106-preview"
|
||||
DEFAULT_MODEL_NAME = "openai/gpt-4o"
|
||||
|
||||
|
||||
@dataclass
|
||||
|
@ -86,7 +86,7 @@ MODEL_SETTINGS = [
|
|||
),
|
||||
ModelSettings(
|
||||
"openai/gpt-4o",
|
||||
"udiff",
|
||||
"diff",
|
||||
weak_model_name="gpt-3.5-turbo",
|
||||
use_repo_map=True,
|
||||
send_undo_reply=True,
|
||||
|
@ -249,6 +249,20 @@ class Model:
|
|||
except Exception:
|
||||
self.info = dict()
|
||||
|
||||
if not self.info and "gpt-4o" in self.name:
|
||||
self.info = {
|
||||
"max_tokens": 4096,
|
||||
"max_input_tokens": 128000,
|
||||
"max_output_tokens": 4096,
|
||||
"input_cost_per_token": 5e-06,
|
||||
"output_cost_per_token": 1.5e-5,
|
||||
"litellm_provider": "openai",
|
||||
"mode": "chat",
|
||||
"supports_function_calling": True,
|
||||
"supports_parallel_function_calling": True,
|
||||
"supports_vision": True,
|
||||
}
|
||||
|
||||
# Are all needed keys/params available?
|
||||
res = self.validate_environment()
|
||||
self.missing_keys = res.get("missing_keys")
|
||||
|
|
|
@ -76,7 +76,7 @@ pip install aider-chat
|
|||
export OPENAI_API_KEY=<key> # Mac/Linux
|
||||
setx OPENAI_API_KEY <key> # Windows
|
||||
|
||||
# GPT-4 Turbo is used by default
|
||||
# GPT-4o is used by default
|
||||
aider
|
||||
|
||||
# GPT-4 Turbo with Vision
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue