Compare commits
4 Commits
f1f1e42e7e
...
a8ce6102d2
Author | SHA1 | Date | |
---|---|---|---|
a8ce6102d2 | |||
236d1c0a10 | |||
7a35029a18 | |||
7a73a1e3fc |
|
@ -387,6 +387,9 @@ def run_ollama_and_get_yes_or_no(cwd, initial_texts: list[str]) -> bool:
|
||||||
|
|
||||||
|
|
||||||
def verify_solution(repository_path: Path, issue_content: str) -> bool:
|
def verify_solution(repository_path: Path, issue_content: str) -> bool:
|
||||||
|
if not EVALUATOR_MODEL:
|
||||||
|
return True
|
||||||
|
|
||||||
summary = run_ollama(
|
summary = run_ollama(
|
||||||
repository_path,
|
repository_path,
|
||||||
[
|
[
|
||||||
|
|
|
@ -45,6 +45,16 @@ def parse_args():
|
||||||
default=300,
|
default=300,
|
||||||
help='Interval in seconds between checks in daemon mode (default: 300)',
|
help='Interval in seconds between checks in daemon mode (default: 300)',
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--aider-model',
|
||||||
|
help='Model to use for generating code (overrides default)',
|
||||||
|
default=None,
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
'--evaluator-model',
|
||||||
|
help='Model to use for evaluating code (overrides default)',
|
||||||
|
default=None,
|
||||||
|
)
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
|
@ -52,6 +62,14 @@ def main():
|
||||||
logging.basicConfig(level='INFO')
|
logging.basicConfig(level='INFO')
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
|
|
||||||
|
# Override default models if provided
|
||||||
|
import aider_gitea as core
|
||||||
|
|
||||||
|
if args.aider_model:
|
||||||
|
core.CODE_MODEL = args.aider_model
|
||||||
|
if args.evaluator_model:
|
||||||
|
core.EVALUATOR_MODEL = args.evaluator_model
|
||||||
|
|
||||||
seen_issues_db = SeenIssuesDB()
|
seen_issues_db = SeenIssuesDB()
|
||||||
client = GiteaClient(args.gitea_url, secrets.gitea_token())
|
client = GiteaClient(args.gitea_url, secrets.gitea_token())
|
||||||
|
|
||||||
|
|
|
@ -169,7 +169,9 @@ class GiteaClient:
|
||||||
# If a pull request for this head/base already exists, return it instead of crashing
|
# If a pull request for this head/base already exists, return it instead of crashing
|
||||||
if response.status_code == 409:
|
if response.status_code == 409:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
'Pull request already exists for head %s and base %s', head, base,
|
'Pull request already exists for head %s and base %s',
|
||||||
|
head,
|
||||||
|
base,
|
||||||
)
|
)
|
||||||
prs = self.get_pull_requests(owner, repo)
|
prs = self.get_pull_requests(owner, repo)
|
||||||
for pr in prs:
|
for pr in prs:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user