INNER CODE UNIT · Python
__run_compiled_instructions
handrew/browserpilot · browserpilot/agents/gpt_selenium_agent.py:248
def __run_compiled_instructions(self, instructions):
"""Runs Python code previously compiled by InstructionCompiler."""
ldict = {"env": self}
self._check_danger(instructions)
try:
exec(instructions, globals(), ldict)
except:
self.__handle_agent_exception(instructions)
self.__complete()
def __print_instruction_and_action(self, instruction, action):
"""Logging the instruction and action."""
info_str = f"\nInstruction: {instruction}\n"
info_str = info_str + f"\nAction: {action}\n"
logger.info(info_str)
def __get_relevant_part_of_stack_trace(self):