openhands.agenthub.planner_agent.prompt
get_hint
def get_hint(latest_action_id: str) -> str
Returns action type hint based on given action_id
get_prompt_and_images
def get_prompt_and_images(
state: State, max_message_chars: int) -> tuple[str, list[str] | None]
Gets the prompt for the planner agent.
Formatted with the most recent action-observation pairs, current task, and hint based on last action
Arguments:
- state (State): The state of the current agent
Returns:
- str: The formatted string prompt with historical values
parse_response
def parse_response(response: str) -> Action
Parses the model output to find a valid action to take
Arguments:
- response (str): A response from the model that potentially contains an Action.
Returns:
- Action: A valid next action to perform from model output