MCPcopy Create free account
hub / github.com/FastMAS/KVCOMM / _execute

Method _execute

KVCOMM/agents/final_decision.py:659–674  ·  view source on GitHub ↗

To be overriden by the descendant class

(self, input:Dict[str,str],  spatial_info:Dict[str,Any], temporal_info:Dict[str,Any],**kwargs)

Source from the content-addressed store, hash-verified

657 return None
658
659 def _execute(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any],**kwargs):
660 """ To be overriden by the descendant class """
661 """ Use the processed input to get the result """
662 output_num = {}
663 max_output = ""
664 max_output_num = 0
665 for info in spatial_info.values():
666 processed_output = self.prompt_set.postprocess_answer(info['output'])
667 if processed_output in output_num:
668 output_num[processed_output] += 1
669 else:
670 output_num[processed_output] = 1
671 if output_num[processed_output] > max_output_num:
672 max_output = processed_output
673 max_output_num = output_num[processed_output]
674 return max_output
675
676 async def _async_execute(self, input:Dict[str,str], spatial_info:Dict[str,Any], temporal_info:Dict[str,Any], mode: str = "default", **kwargs):
677 """ To be overriden by the descendant class """

Callers

nothing calls this directly

Calls 2

valuesMethod · 0.80
postprocess_answerMethod · 0.45

Tested by

no test coverage detected