mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-31 01:35:00 +00:00
aider: Added environment variable override for --model
command-line argument.
# Context: USER: add an env override for --model ASSISTANT: I will add an environment variable override for the `--model` command-line argument in the `aider/main.py` file. ```python aider/main.py <<<<<<< ORIGINAL parser.add_argument( "--model", metavar="MODEL", default="gpt-4", help="Specify the model to use for the main chat (default: gpt-4)", ) ======= parser.add_argument( "--model", metavar="MODEL", default=os.environ.get(f"{env_prefix}MODEL", "gpt-4"), help=f"Specify the model to use for the main chat (default: gpt-4, ${env_prefix}MODEL)", ) >>>>>>> UPDATED ``` Now, the `--model` command-line argument can be overridden using the `AIDER_MODEL` environment variable.
This commit is contained in:
parent
8ce2f381b8
commit
1fedba8505
1 changed files with 2 additions and 2 deletions
|
@ -26,8 +26,8 @@ def main():
|
|||
parser.add_argument(
|
||||
"--model",
|
||||
metavar="MODEL",
|
||||
default="gpt-4",
|
||||
help="Specify the model to use for the main chat (default: gpt-4)",
|
||||
default=os.environ.get(f"{env_prefix}MODEL", "gpt-4"),
|
||||
help=f"Specify the model to use for the main chat (default: gpt-4, ${env_prefix}MODEL)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-3",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue