Updated --sonnet to use Claude 3.5 Sonnet

This commit is contained in:
Paul Gauthier 2024-06-20 14:12:51 -07:00
parent 559279c781
commit 6623110fb0
10 changed files with 21 additions and 19 deletions

View file

@ -6,8 +6,8 @@
Aider lets you pair program with LLMs, Aider lets you pair program with LLMs,
to edit code in your local git repository. to edit code in your local git repository.
Start a new project or work with an existing git repo. Start a new project or work with an existing git repo.
Aider works best with GPT-4o and Claude 3 Opus Aider can [connect to almost any LLM](https://aider.chat/docs/llms.html).
and can [connect to almost any LLM](https://aider.chat/docs/llms.html). and works best with GPT-4o, Claude 3.5 Sonnet and Claude 3 Opus.
<p align="center"> <p align="center">
<img <img

View file

@ -7,7 +7,11 @@ import sys
import configargparse import configargparse
from aider import __version__, models from aider import __version__, models
from aider.args_formatter import MarkdownHelpFormatter, YamlHelpFormatter, DotEnvFormatter from aider.args_formatter import (
DotEnvFormatter,
MarkdownHelpFormatter,
YamlHelpFormatter,
)
from .dump import dump # noqa: F401 from .dump import dump # noqa: F401
@ -43,10 +47,7 @@ def get_parser(default_config_files, git_root):
help="Log the conversation with the LLM to this file (for example, .aider.llm.history)", help="Log the conversation with the LLM to this file (for example, .aider.llm.history)",
) )
group.add_argument( group.add_argument(
"files", "files", metavar="FILE", nargs="*", help="files to edit with an LLM (optional)"
metavar="FILE",
nargs="*",
help="files to edit with an LLM (optional)"
) )
group.add_argument( group.add_argument(
"--openai-api-key", "--openai-api-key",
@ -75,7 +76,7 @@ def get_parser(default_config_files, git_root):
const=opus_model, const=opus_model,
help=f"Use {opus_model} model for the main chat", help=f"Use {opus_model} model for the main chat",
) )
sonnet_model = "claude-3-sonnet-20240229" sonnet_model = "claude-3-5-sonnet-20240620"
group.add_argument( group.add_argument(
"--sonnet", "--sonnet",
action="store_const", action="store_const",
@ -516,6 +517,7 @@ def get_sample_yaml():
return argparse.ArgumentParser.format_help(parser) return argparse.ArgumentParser.format_help(parser)
return parser.format_help() return parser.format_help()
def get_sample_dotenv(): def get_sample_dotenv():
os.environ["COLUMNS"] = "120" os.environ["COLUMNS"] = "120"
sys.argv = ["aider"] sys.argv = ["aider"]
@ -529,6 +531,7 @@ def get_sample_dotenv():
return argparse.ArgumentParser.format_help(parser) return argparse.ArgumentParser.format_help(parser)
return parser.format_help() return parser.format_help()
def main(): def main():
arg = sys.argv[1] if len(sys.argv[1:]) else None arg = sys.argv[1] if len(sys.argv[1:]) else None
@ -540,7 +543,6 @@ def main():
print(get_sample_yaml()) print(get_sample_yaml())
if __name__ == "__main__": if __name__ == "__main__":
status = main() status = main()
sys.exit(status) sys.exit(status)

View file

@ -28,7 +28,7 @@
## Use claude-3-opus-20240229 model for the main chat ## Use claude-3-opus-20240229 model for the main chat
#opus: false #opus: false
## Use claude-3-sonnet-20240229 model for the main chat ## Use claude-3-5-sonnet-20240620 model for the main chat
#sonnet: false #sonnet: false
## Use gpt-4-0613 model for the main chat ## Use gpt-4-0613 model for the main chat

View file

@ -36,7 +36,7 @@
## Use claude-3-opus-20240229 model for the main chat ## Use claude-3-opus-20240229 model for the main chat
#AIDER_OPUS= #AIDER_OPUS=
## Use claude-3-sonnet-20240229 model for the main chat ## Use claude-3-5-sonnet-20240620 model for the main chat
#AIDER_SONNET= #AIDER_SONNET=
## Use gpt-4-0613 model for the main chat ## Use gpt-4-0613 model for the main chat

View file

@ -56,7 +56,7 @@ cog.outl("```")
## Use claude-3-opus-20240229 model for the main chat ## Use claude-3-opus-20240229 model for the main chat
#opus: false #opus: false
## Use claude-3-sonnet-20240229 model for the main chat ## Use claude-3-5-sonnet-20240620 model for the main chat
#sonnet: false #sonnet: false
## Use gpt-4-0613 model for the main chat ## Use gpt-4-0613 model for the main chat

View file

@ -69,7 +69,7 @@ cog.outl("```")
## Use claude-3-opus-20240229 model for the main chat ## Use claude-3-opus-20240229 model for the main chat
#AIDER_OPUS= #AIDER_OPUS=
## Use claude-3-sonnet-20240229 model for the main chat ## Use claude-3-5-sonnet-20240620 model for the main chat
#AIDER_SONNET= #AIDER_SONNET=
## Use gpt-4-0613 model for the main chat ## Use gpt-4-0613 model for the main chat

View file

@ -14,8 +14,8 @@ description: Aider can connect to most LLMs for AI pair programming.
## Best models ## Best models
{: .no_toc } {: .no_toc }
**Aider works best with [GPT-4o](/docs/llms/openai.html) and **Aider works best with [GPT-4o](/docs/llms/openai.html),
[Claude 3 Opus](/docs/llms/anthropic.html),** [Claude 3.5 Sonnet and Claude 3 Opus](/docs/llms/anthropic.html),**
as they are the very best models for editing code. as they are the very best models for editing code.
## Free models ## Free models

View file

@ -22,7 +22,7 @@ setx ANTHROPIC_API_KEY <key> # Windows
# Claude 3 Opus # Claude 3 Opus
aider --opus aider --opus
# Claude 3 Sonnet # Claude 3.5 Sonnet
aider --sonnet aider --sonnet
# List models available from Anthropic # List models available from Anthropic

View file

@ -75,7 +75,7 @@ Use claude-3-opus-20240229 model for the main chat
Environment variable: `AIDER_OPUS` Environment variable: `AIDER_OPUS`
### `--sonnet` ### `--sonnet`
Use claude-3-sonnet-20240229 model for the main chat Use claude-3-5-sonnet-20240620 model for the main chat
Environment variable: `AIDER_SONNET` Environment variable: `AIDER_SONNET`
### `--4` ### `--4`

View file

@ -20,8 +20,8 @@ cog.out(text)
Aider lets you pair program with LLMs, Aider lets you pair program with LLMs,
to edit code in your local git repository. to edit code in your local git repository.
Start a new project or work with an existing git repo. Start a new project or work with an existing git repo.
Aider works best with GPT-4o and Claude 3 Opus Aider can [connect to almost any LLM](https://aider.chat/docs/llms.html).
and can [connect to almost any LLM](https://aider.chat/docs/llms.html). and works best with GPT-4o, Claude 3.5 Sonnet and Claude 3 Opus.
<p align="center"> <p align="center">
<img <img