mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
* docs(docs): start implementing docs website * update video url * add autogenerated codebase docs for backend * precommit * update links * fix config and video * gh actions * rename * workdirs * path * path * fix doc1 * redo markdown * docs * change main folder name * simplify readme * add back architecture * Fix lint errors * lint * update poetry lock --------- Co-authored-by: Jim Su <jimsu@protonmail.com>
1.0 KiB
1.0 KiB
sidebar_label, title
| sidebar_label | title |
|---|---|
| prompt | 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
def get_prompt(plan: Plan, history: List[Tuple[Action, Observation]]) -> str
Gets the prompt for the planner agent. Formatted with the most recent action-observation pairs, current task, and hint based on last action
Arguments:
- plan (Plan): The original plan outlined by the user with LLM defined tasks
- history (List[Tuple[Action, Observation]]): List of corresponding action-observation pairs
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