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.5 KiB
1.5 KiB
sidebar_label, title
| sidebar_label | title |
|---|---|
| prompts | agenthub.monologue_agent.utils.prompts |
get_summarize_monologue_prompt
def get_summarize_monologue_prompt(thoughts: List[dict])
Gets the prompt for summarizing the monologue
Returns:
- str: A formatted string with the current monologue within the prompt
get_request_action_prompt
def get_request_action_prompt(
task: str,
thoughts: List[dict],
background_commands_obs: List[CmdOutputObservation] = [])
Gets the action prompt formatted with appropriate values.
Arguments:
- task (str): The current task the agent is trying to accomplish
- thoughts (List[dict]): The agent's current thoughts
- background_commands_obs (List[CmdOutputObservation]): List of all observed background commands running
Returns:
- str: Formatted prompt string with hint, task, monologue, and background included
parse_action_response
def parse_action_response(response: str) -> Action
Parses a string to find an action within it
Arguments:
- response (str): The string to be parsed
Returns:
- Action: The action that was found in the response string
parse_summary_response
def parse_summary_response(response: str) -> List[dict]
Parses a summary of the monologue
Arguments:
- response (str): The response string to be parsed
Returns:
- List[dict]: The list of summaries output by the model