(func_name: str, arguments: List, thought: str)
| 344 | # added for function calling |
| 345 | @staticmethod |
| 346 | def _extract_function(func_name: str, arguments: List, thought: str): |
| 347 | ret = {"thought": thought, "action": None, "content": None} |
| 348 | if func_name == "bash_action": |
| 349 | ret["action"] = "bash" |
| 350 | ret["content"] = arguments[0] |
| 351 | if func_name == "finish_action": |
| 352 | ret["action"] = "commit" |
| 353 | ret["content"] = arguments[0] if arguments else None |
| 354 | if func_name == "answer_action": |
| 355 | ret["action"] = "commit" |
| 356 | ret["content"] = arguments[0] |
| 357 | |
| 358 | return ret |
| 359 | |
| 360 | async def start_sample(self, index, session: Session) -> TaskSampleExecutionResult: |
| 361 | if not self.env_controller_background_task: |
no outgoing calls
no test coverage detected