openhands.controller.action_parser
ActionParseError Objects
class ActionParseError(Exception)
Exception raised when the response from the LLM cannot be parsed into an action.
ResponseParser Objects
class ResponseParser(ABC)
This abstract base class is a general interface for an response parser dedicated to parsing the action from the response from the LLM.
parse
@abstractmethod
def parse(response: str) -> Action
Parses the action from the response from the LLM.
Arguments:
- response (str): The response from the LLM.
Returns:
- action (Action): The action parsed from the response.
parse_response
@abstractmethod
def parse_response(response) -> str
Parses the action from the response from the LLM.
Arguments:
- response (str): The response from the LLM.
Returns:
- action_str (str): The action str parsed from the response.