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 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.
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)
with sensible commit messages.
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 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">
<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,
making it the best available model for pair programming with AI.
Aider currently supports Claude 3 Opus via
[OpenRouter](https://aider.chat/docs/faq.html#accessing-other-llms-with-openrouter):
To use Claude 3 Opus with aider:
```
# Install aider
pip install aider-chat
# Setup OpenRouter access
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
export ANTHROPIC_API_KEY=sk-...
aider --opus
```
## 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,
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"
core_group.add_argument(
"--4",
@ -238,13 +246,6 @@ def main(argv=None, input=None, output=None, force_git_root=None):
env_var="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(
"--edit-format",
metavar="EDIT_FORMAT",

View file

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