openhands.resolver.resolve_issue
initialize_runtime
def initialize_runtime(runtime: Runtime)
Initialize the runtime for the agent.
This function is called before the runtime is used to run the agent. Currently it does nothing.
complete_runtime
async def complete_runtime(runtime: Runtime,
base_commit: str) -> dict[str, Any]
Complete the runtime for the agent.
This function is called before the runtime is used to run the agent. If you need to do something in the sandbox to get the correctness metric after the agent has run, modify this function.
resolve_issue
async def resolve_issue(owner: str,
repo: str,
token: str,
username: str,
max_iterations: int,
output_dir: str,
llm_config: LLMConfig,
runtime_container_image: str,
prompt_template: str,
issue_type: str,
repo_instruction: str | None,
issue_number: int,
comment_id: int | None,
target_branch: str | None = None,
reset_logger: bool = False) -> None
Resolve a single github issue.
Arguments:
owner
- Github owner of the repo.repo
- Github repository to resolve issues in form ofowner/repo
.token
- Github token to access the repository.username
- Github username to access the repository.max_iterations
- Maximum number of iterations to run.output_dir
- Output directory to write the results.llm_config
- Configuration for the language model.runtime_container_image
- Container image to use.prompt_template
- Prompt template to use.repo
0 - Type of issue to resolve (issue or pr).repo
1 - Repository instruction to use.repo
2 - Issue number to resolve.repo
3 - Optional ID of a specific comment to focus on.repo
4 - Optional target branch to create PR against (for PRs).repo
5 - Whether to reset the logger for multiprocessing.