Skip to content

Commit

Permalink
minor fixes (#56)
Browse files Browse the repository at this point in the history
* minor fixes

* Update github_resolver/resolve_issues.py
  • Loading branch information
rbren authored Sep 18, 2024
1 parent 7b55c08 commit 1467f94
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mypy.ini
.env
.envrc
__pycache__
output/
.vscode
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Run the following command to resolve issues in the `[OWNER]/[REPO]` repository.
For instance, if you want to resolve issues in this repo, you would run:

```bash
poetry run python github_resolver/resolve_issues.py all-hands-ai/github-resolver
poetry run python github_resolver/resolve_issues.py --repo all-hands-ai/github-resolver
```

The output will be written to the `output/` directory.
Expand Down
9 changes: 5 additions & 4 deletions github_resolver/resolve_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ async def run_with_semaphore(task):
parser.add_argument(
"--prompt-file",
type=str,
default="github_resolver/prompts/resolver/basic-with-tests.jinja",
default="github_resolver/prompts/resolve/basic-with-tests.jinja",
help="Path to the prompt template file in Jinja format.",
)
parser.add_argument(
Expand Down Expand Up @@ -657,16 +657,17 @@ async def run_with_semaphore(task):
llm_config = LLMConfig(
model=my_args.llm_model or os.environ["LLM_MODEL"],
api_key=my_args.llm_api_key or os.environ["LLM_API_KEY"],
base_url=my_args.llm_base_url or os.environ["LLM_BASE_URL"],
base_url=my_args.llm_base_url or os.environ.get("LLM_BASE_URL", None),
)

# Read the prompt template
with open(my_args.prompt_file, 'r') as f:
prompt_template = f.read()

repo_instruction = None
with open(my_args.repo_instruction_file, 'r') as f:
repo_instruction = f.read()
if my_args.repo_instruction_file:
with open(my_args.repo_instruction_file, 'r') as f:
repo_instruction = f.read()

asyncio.run(
resolve_issues(
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ packages = [
[tool.poetry.dependencies]
python = "^3.11"
openhands-ai = "^0.9.3"
pandas = "^2.2.2"

[tool.poetry.group.dev.dependencies]
mypy = "*"
Expand Down

0 comments on commit 1467f94

Please sign in to comment.