跳到主要内容

openhands.resolver.issue_definitions

IssueHandlerInterface Objects

class IssueHandlerInterface(ABC)

get_converted_issues

@abstractmethod
def get_converted_issues(issue_numbers: list[int] | None = None,
comment_id: int | None = None) -> list[GithubIssue]

Download issues from GitHub.

get_instruction

@abstractmethod
def get_instruction(
issue: GithubIssue,
prompt_template: str,
repo_instruction: str | None = None) -> tuple[str, list[str]]

Generate instruction and image urls for the agent.

guess_success

@abstractmethod
def guess_success(
issue: GithubIssue, history: list[Event],
llm_config: LLMConfig) -> tuple[bool, list[bool] | None, str]

Guess if the issue has been resolved based on the agent's output.

IssueHandler Objects

class IssueHandler(IssueHandlerInterface)

get_converted_issues

def get_converted_issues(issue_numbers: list[int] | None = None,
comment_id: int | None = None) -> list[GithubIssue]

Download issues from Github.

Returns:

List of Github issues.

get_instruction

def get_instruction(
issue: GithubIssue,
prompt_template: str,
repo_instruction: str | None = None) -> tuple[str, list[str]]

Generate instruction for the agent.

guess_success

def guess_success(
issue: GithubIssue, history: list[Event],
llm_config: LLMConfig) -> tuple[bool, None | list[bool], str]

Guess if the issue is fixed based on the history and the issue description.

PRHandler Objects

class PRHandler(IssueHandler)

get_instruction

def get_instruction(
issue: GithubIssue,
prompt_template: str,
repo_instruction: str | None = None) -> tuple[str, list[str]]

Generate instruction for the agent.

guess_success

def guess_success(
issue: GithubIssue, history: list[Event],
llm_config: LLMConfig) -> tuple[bool, None | list[bool], str]

Guess if the issue is fixed based on the history and the issue description.