Added --opus

This commit is contained in:
Paul Gauthier 2024-04-18 17:01:37 -07:00
parent 3e153cc7fa
commit 93bd187bf3
4 changed files with 15 additions and 19 deletions

View file

@ -1,13 +1,15 @@
# aider is AI pair programming in your terminal # aider is AI pair programming in your terminal
Aider is a command line tool that lets you pair program with GPT-3.5/GPT-4, Aider is a command line tool that lets you pair program with LLMs,
to edit code stored in your local git repository. to edit code stored in your local git repository.
Aider will directly edit the code in your local source files, Aider will directly edit the code in your local source files,
and [git commit the changes](https://aider.chat/docs/faq.html#how-does-aider-use-git) and [git commit the changes](https://aider.chat/docs/faq.html#how-does-aider-use-git)
with sensible commit messages. with sensible commit messages.
You can start a new project or work with an existing git repo. You can start a new project or work with an existing git repo.
Aider is unique in that it lets you ask for changes to [pre-existing, larger codebases](https://aider.chat/docs/repomap.html). Aider is unique in that it lets you ask for changes to [pre-existing, larger codebases](https://aider.chat/docs/repomap.html).
Aider works well with GPT 3.5, GPT-4, GPT-4 Turbo with Vision,
Claude 3 Opus and has support for connecting to almost any LLM.
<p align="center"> <p align="center">
<img src="assets/screencast.svg" alt="aider screencast"> <img src="assets/screencast.svg" alt="aider screencast">

View file

@ -15,19 +15,12 @@ using Aider's code editing benchmark suite.
Claude 3 Opus outperforms all of OpenAI's models, Claude 3 Opus outperforms all of OpenAI's models,
making it the best available model for pair programming with AI. making it the best available model for pair programming with AI.
Aider currently supports Claude 3 Opus via To use Claude 3 Opus with aider:
[OpenRouter](https://aider.chat/docs/faq.html#accessing-other-llms-with-openrouter):
``` ```
# Install aider
pip install aider-chat pip install aider-chat
export ANTHROPIC_API_KEY=sk-...
# Setup OpenRouter access aider --opus
export OPENAI_API_KEY=<your-openrouter-key>
export OPENAI_API_BASE=https://openrouter.ai/api/v1
# Run aider with Claude 3 Opus using the diff editing format
aider --model anthropic/claude-3-opus --edit-format diff
``` ```
## Aider's code editing benchmark ## Aider's code editing benchmark

View file

@ -170,6 +170,14 @@ def main(argv=None, input=None, output=None, force_git_root=None):
default=default_model, default=default_model,
help=f"Specify the model to use for the main chat (default: {default_model})", help=f"Specify the model to use for the main chat (default: {default_model})",
) )
opus_model = "claude-3-opus-20240229"
core_group.add_argument(
"--opus",
action="store_const",
dest="model",
const=opus_model,
help=f"Use {opus_model} model for the main chat",
)
default_4_model = "gpt-4-0613" default_4_model = "gpt-4-0613"
core_group.add_argument( core_group.add_argument(
"--4", "--4",
@ -238,13 +246,6 @@ def main(argv=None, input=None, output=None, force_git_root=None):
env_var="OPENAI_ORGANIZATION_ID", env_var="OPENAI_ORGANIZATION_ID",
help="Specify the OpenAI organization ID", help="Specify the OpenAI organization ID",
) )
model_group.add_argument(
"--openrouter",
dest="openai_api_base",
action="store_const",
const="https://openrouter.ai/api/v1",
help="Specify the api base url as https://openrouter.ai/api/v1",
)
model_group.add_argument( model_group.add_argument(
"--edit-format", "--edit-format",
metavar="EDIT_FORMAT", metavar="EDIT_FORMAT",

View file

@ -101,7 +101,7 @@ MODEL_SETTINGS = [
# Claude # Claude
ModelSettings( ModelSettings(
"claude-3-opus-20240229", "claude-3-opus-20240229",
"udiff", "diff",
weak_model_name="claude-3-haiku-20240307", weak_model_name="claude-3-haiku-20240307",
use_repo_map=True, use_repo_map=True,
send_undo_reply=True, send_undo_reply=True,