To be overriden by the descendant class
(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any], mode: str = "default", **kwargs)
| 631 | return output |
| 632 | |
| 633 | async def _async_execute(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any], mode: str = "default", **kwargs): |
| 634 | """ To be overriden by the descendant class """ |
| 635 | """ Use the processed input to get the result """ |
| 636 | output = "" |
| 637 | info_list = [] |
| 638 | for info in spatial_info.values(): |
| 639 | info_list.append(info['output']) |
| 640 | if len(info_list): |
| 641 | output = info_list[-1] |
| 642 | if mode == "allow_kv_reuse": |
| 643 | return input.get("task"), output |
| 644 | return output |
| 645 | |
| 646 | |
| 647 | @AgentRegistry.register('FinalMajorVote') |