Initialize the CodeExecutor. Args: retry_times (int): The number of times to retry failed actions.
(self, retry_times: int)
| 38 | """ |
| 39 | |
| 40 | def __init__(self, retry_times: int): |
| 41 | """ |
| 42 | Initialize the CodeExecutor. |
| 43 | |
| 44 | Args: |
| 45 | retry_times (int): The number of times to retry failed actions. |
| 46 | """ |
| 47 | self.api_history = [] |
| 48 | self.command_history = [] |
| 49 | self.code_history = [] |
| 50 | self.retry_times = retry_times |
| 51 | self.registered_functions = API_TYPES.all_funcs() |
| 52 | self.function_regex = re.compile(r"^[a-z]+_[a-z_]+\(.+\)") |
| 53 | |
| 54 | def get_apis_docs(self, funcs: list[callable], show_example: bool = True) -> str: |
| 55 | """ |