Skip to content

Commit

Permalink
[PRO-936] Local dev loop with resolver
Browse files Browse the repository at this point in the history
  • Loading branch information
Domiii committed Dec 9, 2024
1 parent 4b0bb41 commit 0f84e95
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
11 changes: 2 additions & 9 deletions openhands/resolver/resolve_issue.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,16 +689,9 @@ def int_or_none(value):

my_args = parser.parse_args()

# NOTE: The correct image name is passed in as argument to the script by the GH action.
# If we don't pass it in, it will auto-build it on the fly. Useful for local dev loop.
runtime_container_image = my_args.runtime_container_image
if runtime_container_image is None:
runtime_container_image = (
# BEGIN REPLAY
# if we start publishing versions of the runtime image, we can use this line. until then just use the latest main build
# f'ghcr.io/replayio-public/runtime:{openhands.__version__}-nikolaik'
'ghcr.io/replayio-public/runtime:main-nikolaik'
# END REPLAY
)

owner, repo = my_args.repo.split('/')
token = my_args.token if my_args.token else os.getenv('GITHUB_TOKEN')
username = my_args.username if my_args.username else os.getenv('GITHUB_USERNAME')
Expand Down
21 changes: 21 additions & 0 deletions scripts/resolver_10609.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
set -e

export LLM_MODEL="anthropic/claude-3.5"

if [[ -z "$LLM_API_KEY" ]]; then
if [[ -z "$ANTHROPIC_API_KEY" ]]; then
echo "LLM_API_KEY or ANTHROPIC_API_KEY environment variable must be set."
exit 1
fi
export LLM_API_KEY=$ANTHROPIC_API_KEY
fi

export DEBUG=1

python -m openhands.resolver.resolve_issue \
--repo replayio-public/bench-devtools-10609 \
--issue-number 15 \
--issue-type issue \
--max-iterations 50 \
--comment-id 2526444494 \
--output-dir /tmp/resolver-output

0 comments on commit 0f84e95

Please sign in to comment.