mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-02 10:45:00 +00:00
examples_as_sys_msg for sonnet gets 100% compliance on exercism eval
This commit is contained in:
parent
30154957bb
commit
42fbe28897
2 changed files with 13 additions and 9 deletions
|
@ -133,8 +133,6 @@ Break large *SEARCH/REPLACE* blocks into a series of smaller blocks that each ch
|
||||||
Include just the changing lines, and a few surrounding lines if needed for uniqueness.
|
Include just the changing lines, and a few surrounding lines if needed for uniqueness.
|
||||||
Do not include long runs of unchanging lines in *SEARCH/REPLACE* blocks.
|
Do not include long runs of unchanging lines in *SEARCH/REPLACE* blocks.
|
||||||
|
|
||||||
Include *ALL* the code being searched and replaced!
|
|
||||||
|
|
||||||
Only create *SEARCH/REPLACE* blocks for files that the user has added to the chat!
|
Only create *SEARCH/REPLACE* blocks for files that the user has added to the chat!
|
||||||
|
|
||||||
To move code within a file, use 2 *SEARCH/REPLACE* blocks: 1 to delete it from its current location, 1 to insert it in the new location.
|
To move code within a file, use 2 *SEARCH/REPLACE* blocks: 1 to delete it from its current location, 1 to insert it in the new location.
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import difflib
|
import difflib
|
||||||
import json
|
import json
|
||||||
import yaml
|
|
||||||
import math
|
import math
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass, fields
|
from dataclasses import dataclass, fields
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
import yaml
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
from aider import urls
|
from aider import urls
|
||||||
|
@ -184,18 +184,21 @@ MODEL_SETTINGS = [
|
||||||
"diff",
|
"diff",
|
||||||
weak_model_name="claude-3-haiku-20240307",
|
weak_model_name="claude-3-haiku-20240307",
|
||||||
use_repo_map=True,
|
use_repo_map=True,
|
||||||
|
examples_as_sys_msg=True,
|
||||||
),
|
),
|
||||||
ModelSettings(
|
ModelSettings(
|
||||||
"anthropic/claude-3-5-sonnet-20240620",
|
"anthropic/claude-3-5-sonnet-20240620",
|
||||||
"diff",
|
"diff",
|
||||||
weak_model_name="claude-3-haiku-20240307",
|
weak_model_name="claude-3-haiku-20240307",
|
||||||
use_repo_map=True,
|
use_repo_map=True,
|
||||||
|
examples_as_sys_msg=True,
|
||||||
),
|
),
|
||||||
ModelSettings(
|
ModelSettings(
|
||||||
"openrouter/anthropic/claude-3.5-sonnet",
|
"openrouter/anthropic/claude-3.5-sonnet",
|
||||||
"diff",
|
"diff",
|
||||||
weak_model_name="openrouter/anthropic/claude-3-haiku-20240307",
|
weak_model_name="openrouter/anthropic/claude-3-haiku-20240307",
|
||||||
use_repo_map=True,
|
use_repo_map=True,
|
||||||
|
examples_as_sys_msg=True,
|
||||||
),
|
),
|
||||||
# Vertex AI Claude models
|
# Vertex AI Claude models
|
||||||
ModelSettings(
|
ModelSettings(
|
||||||
|
@ -472,6 +475,7 @@ class Model:
|
||||||
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
def register_models(model_settings_fnames):
|
def register_models(model_settings_fnames):
|
||||||
files_loaded = []
|
files_loaded = []
|
||||||
for model_settings_fname in model_settings_fnames:
|
for model_settings_fname in model_settings_fnames:
|
||||||
|
@ -484,7 +488,9 @@ def register_models(model_settings_fnames):
|
||||||
|
|
||||||
for model_settings_dict in model_settings_list:
|
for model_settings_dict in model_settings_list:
|
||||||
model_settings = ModelSettings(**model_settings_dict)
|
model_settings = ModelSettings(**model_settings_dict)
|
||||||
existing_model_settings = next((ms for ms in MODEL_SETTINGS if ms.name == model_settings.name), None)
|
existing_model_settings = next(
|
||||||
|
(ms for ms in MODEL_SETTINGS if ms.name == model_settings.name), None
|
||||||
|
)
|
||||||
|
|
||||||
if existing_model_settings:
|
if existing_model_settings:
|
||||||
MODEL_SETTINGS.remove(existing_model_settings)
|
MODEL_SETTINGS.remove(existing_model_settings)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue