openhands.resolver.resolve_issue
initialize_runtime
def initialize_runtime(runtime: Runtime, platform: Platform) -> None
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,
platform: Platform) -> 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,
platform: Platform,
max_iterations: int,
output_dir: str,
llm_config: LLMConfig,
runtime_container_image: str | None,
prompt_template: str,
issue_type: str,
repo_instruction: str | None,
issue_number: int,
comment_id: int | None,
reset_logger: bool = False) -> None
Resolve a single issue.
Arguments:
-
owner
- owner of the repo. -
repo
- repository to resolve issues in form ofowner/repo
. -
token
- token to access the repository. -
username
- username to access the repository. -
platform
- platform of 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. -
repo
0 - Prompt template to use. -
repo
1 - Type of issue to resolve (issue or pr). -
repo
2 - Repository instruction to use. -
repo
3 - Issue number to resolve. -
repo
4 - Optional ID of a specific comment to focus on. -
repo
5 - Whether to reset the logger for multiprocessing.